<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>73152</bug_id>
          
          <creation_ts>2011-11-25 17:46:36 -0800</creation_ts>
          <short_desc>CSS_STRINGs aren&apos;t quoted unless they contain quotes or escape sequences</short_desc>
          <delta_ts>2022-07-26 21:48:42 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CSS</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Eli Grey (:sephr)">bugmail</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>dino</cc>
    
    <cc>hyatt</cc>
    
    <cc>jonlee</cc>
    
    <cc>martin.bouladour</cc>
    
    <cc>mathias</cc>
    
    <cc>mmaxfield</cc>
    
    <cc>rniwa</cc>
    
    <cc>shanestephens</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>yutak</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>509302</commentid>
    <comment_count>0</comment_count>
    <who name="Eli Grey (:sephr)">bugmail</who>
    <bug_when>2011-11-25 17:46:36 -0800</bug_when>
    <thetext>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 &quot;X&quot; url(Y) &quot;&apos;Z&apos;&quot; is returned as X url(Y) &apos;\&apos;Z\&apos;&apos;, which will cause problems if you try to use this value in other CSS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>509310</commentid>
    <comment_count>1</comment_count>
    <who name="Eli Grey (:sephr)">bugmail</who>
    <bug_when>2011-11-25 19:13:45 -0800</bug_when>
    <thetext>I&apos;m also seeing the strings quoted if they contain escape sequences too, though I&apos;m not sure if it applies to all escape sequences.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>512362</commentid>
    <comment_count>2</comment_count>
    <who name="Shane Stephens">shanestephens</who>
    <bug_when>2011-11-30 19:35:49 -0800</bug_when>
    <thetext>Can you provide a test case?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>513001</commentid>
    <comment_count>3</comment_count>
      <attachid>117461</attachid>
    <who name="Eli Grey (:sephr)">bugmail</who>
    <bug_when>2011-12-01 12:45:15 -0800</bug_when>
    <thetext>Created attachment 117461
Testcase

(In reply to comment #2)

Here you go.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>513188</commentid>
    <comment_count>4</comment_count>
    <who name="Eli Grey (:sephr)">bugmail</who>
    <bug_when>2011-12-01 15:19:02 -0800</bug_when>
    <thetext>My workaround: https://gist.github.com/1420621</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>535483</commentid>
    <comment_count>5</comment_count>
      <attachid>122382</attachid>
    <who name="Mathias Bynens">mathias</who>
    <bug_when>2012-01-12 23:55:59 -0800</bug_when>
    <thetext>Created attachment 122382
Alternate testcase</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1078272</commentid>
    <comment_count>6</comment_count>
    <who name="Eli Grey (:sephr)">bugmail</who>
    <bug_when>2015-03-18 12:21:35 -0700</bug_when>
    <thetext>Chromium has a fix at https://code.google.com/p/chromium/issues/detail?id=462031</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1196853</commentid>
    <comment_count>7</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2016-05-26 14:09:39 -0700</bug_when>
    <thetext>&lt;rdar://problem/26502611&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1886906</commentid>
    <comment_count>8</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-07-26 14:42:09 -0700</bug_when>
    <thetext>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!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1887003</commentid>
    <comment_count>9</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2022-07-26 21:48:19 -0700</bug_when>
    <thetext>*** Bug 28869 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1887004</commentid>
    <comment_count>10</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2022-07-26 21:48:34 -0700</bug_when>
    <thetext>This is working now.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>117461</attachid>
            <date>2011-12-01 12:45:15 -0800</date>
            <delta_ts>2011-12-01 12:45:15 -0800</delta_ts>
            <desc>Testcase</desc>
            <filename>testcase.xhtml</filename>
            <type>application/xhtml+xml</type>
            <size>821</size>
            <attacher name="Eli Grey (:sephr)">bugmail</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+DQo8aHRtbCB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94aHRt
bCIgZGlyPSJsdHIiIGxhbmc9ImVuLVVTLXgtSGl4aWUiPg0KPGhlYWQ+DQo8bWV0YSBjaGFyc2V0
PSJ1dGYtOCIvPg0KPHRpdGxlPkNTU09NIENTU19TVFJJTkcgcXVvdGluZyB0ZXN0Y2FzZTwvdGl0
bGU+DQo8L2hlYWQ+DQo8Ym9keT4NCjxzY3JpcHQgdHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlw
dCI+DQo8IVtDREFUQVsNCihmdW5jdGlvbigpew0KInVzZSBzdHJpY3QiOw0KDQp2YXINCiAgc3R5
bGUgPSBkb2N1bWVudC5kb2N1bWVudEVsZW1lbnQuYXBwZW5kQ2hpbGQoZG9jdW1lbnQuY3JlYXRl
RWxlbWVudCgic3R5bGUiKSkNCiwgcnVsZXMgPSBzdHlsZS5zaGVldC5jc3NSdWxlcw0KLCB0ZXN0
X3J1bGUgPSBzdHlsZS5zaGVldC5pbnNlcnRSdWxlKCI6bm90KCopOjphZnRlcntjb250ZW50OidY
Jzt9IiwgcnVsZXMubGVuZ3RoKQ0KLCBjc3MgPSBydWxlc1t0ZXN0X3J1bGVdLnN0eWxlLmdldFBy
b3BlcnR5VmFsdWUoImNvbnRlbnQiKQ0KLCByZXN1bHQgPSBkb2N1bWVudC5ib2R5LmZpcnN0Q2hp
bGQNCjsNCg0KaWYgKC9eXHMqWyInXS8udGVzdChjc3MpKSB7DQoJcmVzdWx0LmRhdGEgPSAiUEFT
UyI7DQp9IGVsc2Ugew0KCXJlc3VsdC5kYXRhID0gIkZBSUwiOw0KfQ0KDQpyZXN1bHQuZGF0YSAr
PSAiICgiICsgcnVsZXNbdGVzdF9ydWxlXS5zdHlsZS5jc3NUZXh0ICsgIikiOw0KDQpkb2N1bWVu
dC5kb2N1bWVudEVsZW1lbnQucmVtb3ZlQ2hpbGQoc3R5bGUpOw0KDQp9KCkpOw0KXV0+DQo8L3Nj
cmlwdD4NCjwvYm9keT4NCjwvaHRtbD4=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>122382</attachid>
            <date>2012-01-12 23:55:59 -0800</date>
            <delta_ts>2012-01-12 23:55:59 -0800</delta_ts>
            <desc>Alternate testcase</desc>
            <filename>getComputedStyle-content.html</filename>
            <type>text/html</type>
            <size>603</size>
            <attacher name="Mathias Bynens">mathias</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+Cjx0aXRsZT5nZXRDb21wdXRlZFN0eWxlKGVsLCAnOjpiZWZvcmUnKS5j
b250ZW50PC90aXRsZT4KPHN0eWxlPgoJaHRtbDo6YWZ0ZXIgeyBjb250ZW50OiAndGVzdCc7IH0K
CWh0bWw6OmJlZm9yZSB7IGNvbnRlbnQ6ICJ0ZXN0IjsgfQo8L3N0eWxlPgo8ZGl2PlRlc3Rpbmcu
Li48L2Rpdj4KPHNjcmlwdD4KCXZhciBodG1sID0gZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50LAoJ
ICAgIHJlZ2V4ID0gL15bIiddW1xzXFNdKlsiJ10kLzsKCWRvY3VtZW50LnF1ZXJ5U2VsZWN0b3Io
J2RpdicpLmlubmVySFRNTCA9IFsnOjpiZWZvcmUnLCAnOjphZnRlciddLm1hcChmdW5jdGlvbihw
c2V1ZG9FbGVtZW50KSB7CgkJdmFyIHZhbHVlID0gd2luZG93LmdldENvbXB1dGVkU3R5bGUoaHRt
bCwgcHNldWRvRWxlbWVudCkuY29udGVudDsKCQlyZXR1cm4gJzxjb2RlPicgKyBwc2V1ZG9FbGVt
ZW50ICsgJzwvY29kZT5cJ3MgPGNvZGU+Y29udGVudDwvY29kZT4gdmFsdWUgaXM6IDxjb2RlPicg
KyB2YWx1ZSArICc8L2NvZGU+LiAnICsgKHJlZ2V4LnRlc3QodmFsdWUpID8gJ1BBU1MnIDogJ0ZB
SUwnKTsKCX0pLmpvaW4oJzxicj4nKTsKPC9zY3JpcHQ+
</data>

          </attachment>
      

    </bug>

</bugzilla>