Bug 157052 - innerHTML getter for <style> and <script> in XML document is inconsistent with the setter
Summary: innerHTML getter for <style> and <script> in XML document is inconsistent wit...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2016-04-26 16:55 PDT by Boris Zbarsky
Modified: 2016-04-28 22:07 PDT (History)
1 user (show)

See Also:

Testcase (312 bytes, application/xhtml+xml)
2016-04-26 16:55 PDT, Boris Zbarsky
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Zbarsky 2016-04-26 16:55:06 PDT
Created attachment 277423 [details]

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.