Setting cssText with a single quote inside converts to double quote
Reported by
eric.and...@gmail.com,
Apr 7 2016
|
||
Issue descriptionChrome Version : 49.0.2623.110 URLs (if applicable) : https://jsbin.com/visapefesu/edit?output Other browsers tested: Add OK or FAIL, along with the version, after other browsers where you have tested this issue: Safari: Firefox: FAIL IE: What steps will reproduce the problem? (1) Go to this URL https://jsbin.com/visapefesu/edit?output and click the different buttons. What is the expected result? I would expect Chrome to respect the single quote, and not convert it to an HTML entity when fetching innerHTML on the parent element. What happens instead? The single quote is converted to a double quote, and then converted to an HTML entity when getting it via innerHTML. Please provide any additional information below. Attach a screenshot if possible.
,
Apr 11 2016
I think this is working as intended and the behaviour in the specs (which is why FF and IE behave the same). According to CSSOM, the style IDL attribute is PutForwards=cssText. Setting e.style.cssText value will result in the string being parsed and reading it back (incl. via innerHTML) will give the serialized value (CSSOM defines serialization of urls to use double quotes). https://drafts.csswg.org/cssom/#the-elementcssinlinestyle-interface https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-csstext |
||
►
Sign in to add a comment |
||
Comment 1 by nyerramilli@chromium.org
, Apr 11 2016Components: Blink>CSS
Labels: M-51 OS-Linux OS-Mac OS-Windows
Status: Untriaged (was: Unconfirmed)