W3C home > Mailing lists > Public > www-style@w3.org > August 2013

Re: [css-syntax] Defining "character"

From: Simon Sapin <simon.sapin@exyr.org>
Date: Mon, 12 Aug 2013 15:35:49 +0100
Message-ID: <5208F2C5.2000701@exyr.org>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
CC: www-style@w3.org
Le 12/08/2013 15:16, Bjoern Hoehrmann a écrit :
> * Simon Sapin wrote:
>> 2. Have a normative definition near the beginning like this: "Within
>> this specification, the ambiguous term <dfn>character</dfn> is used as a
>> friendlier synonym for Unicode code point." This is what CSS Text does,
>> except that there "character" means grapheme cluster rather than code point.
>
> The term is not ambiguous if it is normatively defined. Do note that the
> surrogate code points are code points; if you do not want to include the
> surrogate code points, the term to use is usually Unicode Scalar Value.

I think it would be the right thing to do, but unfortunately it is 
possible to inject (CSS-unescaped) surrogates into CSS though JavaScript:


data:text/html,<style>body:before{}</style><script>document.styleSheets[0].cssRules[0].style.content="'-\ud834\udd1e-'"</script>


data:text/html,<style>body:before{}</style><script>document.styleSheets[0].cssRules[0].style.content="'-\ud834-\udd1e-'"</script>


-- 
Simon Sapin
Received on Monday, 12 August 2013 14:36:16 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:30 UTC