Closed Bug 445166 Opened 18 years ago Closed 18 years ago

innerHTML setter in XHTML document rejects HTML entities such as  

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: jruderman, Unassigned)

References

Details

(Keywords: testcase)

Attachments

(1 file)

458 bytes, application/xhtml+xml
Details
Attached file testcase —
(Re-reporting bug 444576, which got a little messy.) The innerHTML in an XHTML document setter accepts "pure XML" entities such as & but rejects HTML-specific entities such as &nsbp;. I think it should accept both. (It would be even better if it went beyond that and took the DTD into consideration; see bug 325581 for an example with MathML entities.) Quick survey of browser behaviors on Tiger: * Firefox trunk: NS_ERROR_INVALID_POINTER * Firefox 2: NS_ERROR_DOM_SYNTAX_ERR * Safari: NO_MODIFICATION_ALLOWED_ERR (clearly a lie, since it allows &) * Opera: Works.
OS: Mac OS X → All
Hardware: PC → All
What does HTML5 say here?
That Firefox is correct. http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#innerhtml basically says to create a new XML parser. The only bits you feed to it are the element start tag including namespace prefixes and the default namespace in scope. No entity declarations and such.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → INVALID
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: