Closed Bug 274950 Opened 20 years ago Closed 20 years ago

Embedded decimal escapes in JS string not decoded

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: mark, Assigned: bugzilla)

References

()

Details

(this may be related to bug #266063)

Decimal escape characters ("r") in a javascript string variable are not
being decoded. This is mostly visible when using JS behind buttons. 

Seen failing on: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5)
Gecko/20041107 Firefox/1.0


Example page: http://midiwall.com/misc/js_decimal_strings.html
This example page "works" in various forms of IE.
Really?! I'm surprised IE got that wrong, it's pretty basic and unambiguous.
http://www.w3.org/TR/REC-html40/types.html#h-6.14 :

[[[
Please note that script data that is element content may not contain character
references, but script data that is the value of an attribute may contain them.
The appendix provides further information about specifying non-HTML data.
]]]
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
****... well, okay.

So given the "resolved invalid" tag, I take it that this would be considered a
non-standard IE extension?


Bummer. Thanks for looking into it!
Not so much "non-standard extension" as "actively wrong, and breaking the web."
They may have some bugwards-compatible reason for being that way (like IE 3 got
it wrong, and they don't want to break ancient pages), but because <script>var
foo = "&#222;";</script> is required by the spec to put literally &#222; in foo,
we aren't going to put a capital thorn in there instead.
You need to log in before you can comment on or make changes to this bug.