W3C home > Mailing lists > Public > www-style@w3.org > February 2010

Re: [css2.1] Content of a string containing a backslash followed immediately by EOF

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 16 Feb 2010 19:29:07 -0500
Message-ID: <4B7B3853.6010300@mit.edu>
To: Zack Weinberg <zweinberg@mozilla.com>
CC: www-style@w3.org
On 2/16/10 6:06 PM, Zack Weinberg wrote:
> (Gecko puts a single backslash between the 'a' and the 'b'.  Opera puts
> nothing there.  Webkit and IE8 don't seem to support this use
> of ::before.)

Not sure about IE, but it looks like Webkit somehow messes up \\ at the 
end of the before content no matter what.  |content: "\\m";| shows a 
backslash followed by an 'm', but |content: "whatever\\"| shows nothing.

And even more clearly, something like this:

   <style>.a:before { content: "m\\"; } .a { content: "o\\" }</style>
   <div>a:'<span class="a">'</span></div>

Renders as:

   a:'m\"; } .a { content: '

in Webkit.  So it looks like the \\ is somehow managing to escape the 
'"' in Webkit's parser.

Received on Wednesday, 17 February 2010 00:29:44 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:43 UTC