WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
73152
CSS_STRINGs aren't quoted unless they contain quotes or escape sequences
https://bugs.webkit.org/show_bug.cgi?id=73152
Summary
CSS_STRINGs aren't quoted unless they contain quotes or escape sequences
Eli Grey (:sephr)
Reported
2011-11-25 17:46:36 PST
If you access a CSS_STRING primitive value through the CSSOM, and read the cssText property, the value is unquoted, unless it already contained a quote. This caused problems while I was trying to get the content property of ::before and ::after pseudo-elements using getComputedStyle(). For example, a content property with a value of "X" url(Y) "'Z'" is returned as X url(Y) '\'Z\'', which will cause problems if you try to use this value in other CSS.
Attachments
Testcase
(821 bytes, application/xhtml+xml)
2011-12-01 12:45 PST
,
Eli Grey (:sephr)
no flags
Details
Alternate testcase
(603 bytes, text/html)
2012-01-12 23:55 PST
,
Mathias Bynens
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Eli Grey (:sephr)
Comment 1
2011-11-25 19:13:45 PST
I'm also seeing the strings quoted if they contain escape sequences too, though I'm not sure if it applies to all escape sequences.
Shane Stephens
Comment 2
2011-11-30 19:35:49 PST
Can you provide a test case?
Eli Grey (:sephr)
Comment 3
2011-12-01 12:45:15 PST
Created
attachment 117461
[details]
Testcase (In reply to
comment #2
) Here you go.
Eli Grey (:sephr)
Comment 4
2011-12-01 15:19:02 PST
My workaround:
https://gist.github.com/1420621
Mathias Bynens
Comment 5
2012-01-12 23:55:59 PST
Created
attachment 122382
[details]
Alternate testcase
Eli Grey (:sephr)
Comment 6
2015-03-18 12:21:35 PDT
Chromium has a fix at
https://code.google.com/p/chromium/issues/detail?id=462031
Radar WebKit Bug Importer
Comment 7
2016-05-26 14:09:39 PDT
<
rdar://problem/26502611
>
Ahmad Saleem
Comment 8
2022-07-26 14:42:09 PDT
I am unable to reproduce this bug in attached test cases in Safari 15.6 on macOS 12.5 and results match with all other browsers (Chrome Canary 106 and Firefox Nightly 104). Thanks!
Ryosuke Niwa
Comment 9
2022-07-26 21:48:19 PDT
***
Bug 28869
has been marked as a duplicate of this bug. ***
Ryosuke Niwa
Comment 10
2022-07-26 21:48:34 PDT
This is working now.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug