Skip to content

unescapeString doesn't properly unescape unicode characters #12

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
pieter opened this issue Apr 12, 2016 · 1 comment · Fixed by #13
Closed

unescapeString doesn't properly unescape unicode characters #12

pieter opened this issue Apr 12, 2016 · 1 comment · Fixed by #13

Comments

@pieter
Copy link
Contributor

pieter commented Apr 12, 2016

The following are valid unicode escaped strings:

  • '\a'
  • '\00000A'

Both of these aren't matched by unescapeString(), which wants to have at least 2 characters and a maximum of 5. In fact stringifyValues() can stringily to '\A', which then can't be parsed again by parseValues().

pieter pushed a commit to pieter/css-selector-tokenizer that referenced this issue Apr 13, 2016
This fixes the parsing of unicode strings that are 1 or 6
hex characters long.

Extends the tests to support a third element in examples, which
would be the re-stringified example, since a unicode character might
be stringified in a different way than the original code, and still be
valid.

fixes webpack-contrib/css-loader#133
fixes css-modules#12
pieter added a commit to pieter/css-selector-tokenizer that referenced this issue Apr 13, 2016
This fixes the parsing of unicode strings that are 1 or 6
hex characters long.

Extends the tests to support a third element in examples, which
would be the re-stringified example, since a unicode character might
be stringified in a different way than the original code, and still be
valid.

fixes webpack-contrib/css-loader#133
fixes css-modules#12
@track0x1
Copy link

Can we please have this fix put in and bump the version in css-loader?

geelen added a commit that referenced this issue Jul 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants