Bug 19894 - Document.createTextNode does not interpret HTML entities (eg, …)
Summary: Document.createTextNode does not interpret HTML entities (eg, …)
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.5
: P3 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-04 05:26 PDT by François Lamboley
Modified: 2008-07-04 19:55 PDT (History)
0 users

See Also:


Attachments
Test case (1.06 KB, application/xhtml+xml)
2008-07-04 05:28 PDT, François Lamboley
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description François Lamboley 2008-07-04 05:26:59 PDT
When adding a p element with a text node containing an html code, the text shown on the page is the litteral string, without any interpretation of this html code (see attachment for test reduction)
Comment 1 François Lamboley 2008-07-04 05:28:44 PDT
Created attachment 22086 [details]
Test case
Comment 2 Mark Rowe (bdash) 2008-07-04 19:55:30 PDT
createTextNode is not expected to interpret entities.  Entities are a function of the HTML and XML serializations of the DOM, not of the DOM itself.  You can insert non-ASCII characters by passing a string to createTextNode that contains the required Unicode characters.  If you need to insert an entity reference then the DOM way of doing that would be to use Document.createEntityReference.

Note that in my testing, WebKit behaves identically to Firefox 3 on this matter.