RESOLVED INVALID 40619
HTML DOM entities are not encoded(escaped) as expected
https://bugs.webkit.org/show_bug.cgi?id=40619
Summary HTML DOM entities are not encoded(escaped) as expected
kokilakr@gmail.com
Reported 2010-06-15 04:49:36 PDT
Using javascript innerHTML or OuterHTML from DOM returns the decoded HTML entity. Example <div id='id1'>sample &copy; text</div> decodes the &copy; and is returned. Whereas few of the entities like &amp; are properly encoded. Expected result: The entities should not be decoded.
Attachments
Alexey Proskuryakov
Comment 1 2010-06-15 10:40:42 PDT
Why do you expect this? It's not how any browser works to the best of my knowledge. More specifically, implementing that would involve preserving entity nodes in DOM, which would be incompatible with other browsers and slow. If you have a test case that works in other browser engines, but not in WebKit, please attach it.
Note You need to log in before you can comment on or make changes to this bug.