Skip to content

[cssom] Serialization of NULL in string #1105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
upsuper opened this issue Mar 16, 2017 · 1 comment
Closed

[cssom] Serialization of NULL in string #1105

upsuper opened this issue Mar 16, 2017 · 1 comment
Labels
cssom-1 Current Work

Comments

@upsuper
Copy link
Member

upsuper commented Mar 16, 2017

The algorithm to serialize a string has a separate clause for NULL character which says:

If the character is NULL (U+0000), then the REPLACEMENT CHARACTER (U+FFFD) escaped as code point.

However, this doesn't match behavior of any browser.

Firefox and Chrome serialize NULL character to U+FFFD without escaping it as code point. Edge strips anything after NULL, and Safari serializes it as the character escaped as code point (so \0).

I guess the spec means to do what Firefox and Chrome are currently doing, so probably we should fix the spec text?

@zcorpan
Copy link
Member

zcorpan commented Mar 16, 2017

Yes, it should be a literal U+FFFD.

061ede6 intended to fix this but only did so for identifiers, not strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cssom-1 Current Work
Projects
None yet
Development

No branches or pull requests

2 participants