On Thu, 20 Mar 2014 17:11:01 +0100, Anne van Kesteren <ann...@annevk.nl>
wrote:
On Thu, Mar 20, 2014 at 3:17 PM, Boris Zbarsky <bzbar...@mit.edu> wrote:
http://dev.w3.org/csswg/cssom/#the-css.escape%28%29-method which allows
web
pages to create a valid CSS identifier that will parse to a given
string. A
typical use case is:
document.querySelector('#' + CSS.escape(stringIDontControl))
Unless there are objections, I'm going to check this in without a
preference, for Firefox 31. The spec for this is very straightforward
and
not likely to change, apart from the feature disappearing altogether or
something. But I think this feature is pretty much necessary in some
form,
whether built into the platform or as a library, to safely use
querySelector-like APIs with non-literal strings.
Bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=955860
Please let me know if there are objections.
Seems fine, specification should probably clarify surrogate handling.
I would expect a paired surrogate in JavaScript to end up as a single
escape.
A paired surrogate is left unchanged by CSS.escape().
--
Simon Pieters
Opera Software
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform