Re: [CSS21] Escaping characters (comment, editorial)

On 12/04/2011 12:50 AM, Øyvind Stenhaug wrote:
> On Sun, 10 Apr 2011 16:27:57 +0200, Alan Gresley <alan@css-class.com>
> wrote:
>
>> http://css-class.com/test/css21testsuite/escapes-085.xht
>>
>>
>> p\0 p { background: red } /* Opera 11.01 parses */
>>
>> div\0 div { background: red } /* Opera 11.01 parses */
>>
>> div *\0 * { background: red } /* Opera 11.01 parses */
>>
>>
>> The last one shows that interesting case of an escape followed by the
>> digit 0 ('\0'). I think Opera has a bug.
>
> This one has been mentioned before. CSS 2.1 doesn't define any expected
> behavior.
>
> http://lists.w3.org/Archives/Public/public-css-testsuite/2010Sep/0049.html


I fine with '/0' not being defined in CSS2.1 but Opera should be seeing 
'\0' as an unrecognized escaped identifier following (without 
whites-space) recognized identifiers ('p', 'div' and '*').

At the moment, Opera drops the '/0' and see these identifiers.


   p { background: red } /* Opera 11.01 parses */

   div { background: red } /* Opera 11.01 parses */

   div * { background: red } /* Opera 11.01 parses */


This leaves it open for authors to abuse such parsing by targeting Opera 
with alternative CSS.



-- 
Alan http://css-class.com/

Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo

Received on Monday, 11 April 2011 19:09:15 UTC