Closed
Bug 349775
Opened 18 years ago
Closed 18 years ago
javascript document.write converts '<' to '&lt'
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: s1, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; da; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; da; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6
The following code should display as:
<test>
But displays as:
<test>
Reproducible: Always
Steps to Reproduce:
<html>
<body>
<script language="javascript">
document.writeln('<test>');
</script>
</body>
</html>
Comment 1•18 years ago
|
||
A character entity reference ends properly with a semicolon, newline, or the
start of a tag, and improperly in error recovery with the first character
that's not a legal NAME character in HTML (anything but A-Z, a-z, 0-9, or .-_:).
That means you can get away with saying <?xml because the ? can't be part of an entity name, but you have to use <test rather than <test because <test might be an entity we don't recognize, rather than the entity named lt and the word test.
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•