Closed
Bug 287395
Opened 20 years ago
Closed 19 years ago
Setting a div innerText improperly interprets text as HTML
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 264412
People
(Reporter: bgould, Assigned: bugzilla)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
For example:
<HTML>
Menú
<p>
<DIV ID="menuName">BEFORE Menú</DIV>
<p>
<script>
var foo="AFTER Menú";
alert("changing content");
document.getElementById("menuName").innerText=foo;
alert("changed");
</script>
The div should show the " " and the special character uninterpreted if the
value is set with innerText. Instead it is doing as if I said to set "innerHTML".
Reproducible: Always
Steps to Reproduce:
1. Create a div
2. Set the contents with .innerText using special characters
3.
Actual Results:
Values appear interpreted
Expected Results:
Values should appear raw.
Comment 1•20 years ago
|
||
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b2) Gecko/20050227
Firefox/1.0+
I am having difficulty seeing precisely what you have done. Does Firefox
actually implement innerText?
See http://www.reloco.com.ar/mozilla/compat.html
http://www.mozilla.org/docs/web-developer/upgrade_2.html#dom_unsupp and
http://nexgenmedia.net/evang/iemozguide/
See Bug 254174 "textarea innerText returns undefined in javascript",
Bug 254174 Comment 1
See Bug 264412 "innerText property on various elements not updatable with
javascript", Bug 264412 Comment 1
Are you using your own implementation of innerText, and not showing it here?
Does the fix reported for Bug 282317 "IHTMLElement::innerText property
incorrectly implemented - returns a value including HTML tags" (which I have
not yet picked up) change anything here?
Comment 2•20 years ago
|
||
Firefox does not support innerText, if you somehow emulate this, then attach a
testcase to this bug and reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
Updated•19 years ago
|
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Comment 3•19 years ago
|
||
*** This bug has been marked as a duplicate of 254174 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago → 19 years ago
Resolution: --- → DUPLICATE
Updated•19 years ago
|
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
Comment 4•19 years ago
|
||
*** This bug has been marked as a duplicate of 264412 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago → 19 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•