Bug 157052

Summary: innerHTML getter for <style> and <script> in XML document is inconsistent with the setter
Product: WebKit Reporter: Boris Zbarsky <bzbarsky>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: ahmad.saleem792, ap, bfulgham, cdumez, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Testcase none

Boris Zbarsky
Reported 2016-04-26 16:55:06 PDT
Created attachment 277423 [details] Testcase STEPS TO REPRODUCE: Load attached testcase from a .xhtml filename. EXPECTED RESULTS: The two alerts should show the same text. ACTUAL RESULTS: Two alerts showing different text. ADDITIONAL INFORMATION: Looks like the innerHTML setter on script/style sets the textContent even in XML, but the getter serializes as XML and ends up escaping things. See also https://github.com/w3c/DOM-Parsing/issues/6 and https://bugs.chromium.org/p/chromium/issues/detail?id=605973 for the Blink equivalent of this bug.
Attachments
Testcase (312 bytes, application/xhtml+xml)
2016-04-26 16:55 PDT, Boris Zbarsky
no flags
Ahmad Saleem
Comment 1 2022-08-11 14:09:42 PDT
*** Safari 15.6 on macOS 12.5 *** &lt;foo&gt;&lt;/foo&gt; &amp;lt;foo&amp;gt;&amp;lt;/foo&amp;gt; *** Firefox Nightly 105 *** <foo></foo> <foo></foo> *** Chrome Canary 106 *** &lt;foo&gt;&lt;/foo&gt; &amp;lt;foo&amp;gt;&amp;lt;/foo&amp;gt; ___________ As can be seen above this is still present and both dialogs are different. Chrome bug has been marked as "External Dependency" without any clarity but just wanted to share updated status. Thanks!
Radar WebKit Bug Importer
Comment 2 2022-08-11 14:11:21 PDT
Note You need to log in before you can comment on or make changes to this bug.