New issue
Advanced search Search tips

Issue 601599 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Apr 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Setting cssText with a single quote inside converts to double quote

Reported by eric.and...@gmail.com, Apr 7 2016

Issue description

Chrome 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.

 
Cc: nyerramilli@chromium.org
Components: Blink>CSS
Labels: M-51 OS-Linux OS-Mac OS-Windows
Status: Untriaged (was: Unconfirmed)
Thanks for the report.

Able to reproduce this on Win7, Mac OS X 10.11.3, Ubuntu 14.04 using Chrome Stable 	49.0.2623.112, Canary 52.0.2705.0

Not a regression, issue existing from M30 # 30.0.1549.0 (Official Build 208818)
Observing the same functionality in IE 11, FF 45.0.1 also, requesting Dev team to check and update.

Comment 2 by timloh@chromium.org, Apr 11 2016

Cc: timloh@chromium.org
Status: WontFix (was: Untriaged)
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