Last Comment Bug 445166 - innerHTML setter in XHTML document rejects HTML entities such as  
: innerHTML setter in XHTML document rejects HTML entities such as  
: testcase
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
-- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
: Andrew Overholt [:overholt]
: 444576 675061 (view as bug list)
Depends on:
Blocks: 325581
  Show dependency treegraph
Reported: 2008-07-14 09:51 PDT by Jesse Ruderman
Modified: 2011-07-29 03:41 PDT (History)
7 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

testcase (458 bytes, application/xhtml+xml)
2008-07-14 09:51 PDT, Jesse Ruderman
no flags Details

Description User image Jesse Ruderman 2008-07-14 09:51:40 PDT
Created attachment 329474 [details]

(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:



* Safari: NO_MODIFICATION_ALLOWED_ERR (clearly a lie, since it allows &)

* Opera: Works.
Comment 1 User image Jesse Ruderman 2008-07-14 09:53:25 PDT
*** Bug 444576 has been marked as a duplicate of this bug. ***
Comment 2 User image Boris Zbarsky [:bz] (still a bit busy) 2008-07-14 11:00:51 PDT
What does HTML5 say here?
Comment 3 User image Anne (:annevk) 2008-07-14 11:16:20 PDT
That Firefox is correct. 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.
Comment 4 User image j.j. 2011-07-29 03:41:49 PDT
*** Bug 675061 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.