innerHTML setter in XHTML document rejects HTML entities such as  

RESOLVED INVALID

Status

()

Core
DOM
RESOLVED INVALID
9 years ago
6 years ago

People

(Reporter: Jesse Ruderman, Unassigned)

Tracking

({testcase})

Trunk
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

458 bytes, application/xhtml+xml
Details
(Reporter)

Description

9 years ago
Created attachment 329474 [details]
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.
(Reporter)

Updated

9 years ago
Duplicate of this bug: 444576
(Reporter)

Updated

9 years ago
OS: Mac OS X → All
Hardware: PC → All
What does HTML5 say here?

Comment 3

9 years ago
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
Last Resolved: 9 years ago
Resolution: --- → INVALID

Updated

6 years ago
Duplicate of this bug: 675061
You need to log in before you can comment on or make changes to this bug.