W3C home > Mailing lists > Public > www-style@w3.org > December 2015

Re: [cssom] serializing U+0000 NULL

From: Simon Pieters <simonp@opera.com>
Date: Thu, 03 Dec 2015 09:20:58 +0100
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: "www-style list" <www-style@w3.org>, "Richard Gibson" <richard.gibson@gmail.com>, "Glenn Adams" <glenn@skynav.com>, "Boris Zbarsky" <bzbarsky@mit.edu>, "Mathias Bynens" <mathiasb@opera.com>
Message-ID: <op.x816s8dhidj3kv@simons-mbp>
On Tue, 01 Dec 2015 13:01:16 +0100, Simon Pieters <simonp@opera.com> wrote:

>>> Thanks. They're both simple to spec, the main difference is how it
>>> round-trips. If you serialize as \0, then this does not hold:
>>>     CSS.escape(foo) ===  
>>> CSS.escape(parseAComponentValue(CSS.escape(foo)))
>> Sure, then lets serialize it as U+FFFD.
> Fixed:  
> https://github.com/w3c/csswg-drafts/commit/c2028630eaabcd07573ba4df11b8e8ecf653eeaf
> Thanks Richard!

Hmm. I noticed now that U+FFFD is not escaped by CSSOM's rules, so the  
above still doesn't hold. It should just be the U+FFFD character. Not  
escaping is consistent with what browsers do for e.g.  
CSSRule#selectorText. Will fix now. Sorry for not checking this more  
throughly earlier!

Simon Pieters
Opera Software
Received on Thursday, 3 December 2015 08:21:32 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:58 UTC