Closed Bug 137126 Opened 23 years ago Closed 23 years ago

innerHTML escapes <> everywhere

Categories

(Core :: DOM: Core & HTML, defect, P5)

x86
Windows 2000
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: anders, Assigned: jst)

References

()

Details

(Whiteboard: [CANT REPRO])

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.9) Gecko/20020311 BuildID: 20020311 and 20020412 very much like entry #60619 The thing is that I've failed utterly to reproduce the problem outside of our environment. For me the problem is serious because if i user innerHTML on any element <> chars get converted to &lt; and &gt;. To update divs is a pain now. I get these errors when assigning innerHTML to divs in a frame totally generated by javascript. I have been unable to mimic this behaviour in any way. It works in IE and on server generated pages. Reproducible: Couldn't Reproduce Steps to Reproduce: This is the frustrating part. If I try to lift the code out of our dev environment it works. What i do is in the description, create string of type "<table> etc..." Actual Results: My divs get filled with html-as-text in format "&lt;table&gt; etc..." Expected Results: unconverted html
Without an actual testcase that reproduces this bug, there is not much that can be done. I have been unable to reproduce it... please provide a test url or upload a file using http://bugzilla.mozilla.org/attachment.cgi?bugid=137126&action=enter that reproduces the problem.
Anders, any luck with that testcase? Could you save the entire web page the problem happens on (using "web page, complete" as the save format) and attach to this bug?
Sorry I could not reproduce this with a local version of my troublesome web page (so maybe it's not too serious). I rewrote the script using nodes instead of innerHTML (much better in all aspects). That was a great learning experience so now I'm happy again. I was only having problems with this on pages created with "frame.document.open();frame.document.write(html);frame.document.close()"-style dhtml and since that is kind of an obsolete way of doing things i don't think people will hav any problems. Only my 0.02 $ but I wouldn't give this to much prioroty.
Marking NEW, we will look at it again if/when we have a testcase
Severity: major → normal
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P5
Whiteboard: [CANT REPRO]
QA Contact: lchiang → ian
worksforme. we need testcases.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
Component: DOM: Mozilla Extensions → DOM
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.