NEW 157052
innerHTML getter for <style> and <script> in XML document is inconsistent with the setter
https://bugs.webkit.org/show_bug.cgi?id=157052
Summary innerHTML getter for <style> and <script> in XML document is inconsistent wit...
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.