[Bug] Removal of quotes for property names with special unicode still broken
See original GitHub issueDespite PR #543 - Fix removal of quotes from property names, there is still a problem with how quotes are removed from property names that can be noticed when trying to load the minified he library in the latest Safari.
To clarify, given the following input file:
module.exports = {
'\uD835\uDCB6': 'ascr'
};
The babili output is the following:
module.exports={𝒶:'ascr'}
If you try to load that in Safari you get the following error:
SyntaxError: Invalid character '\u55349'
Thoughts?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:12 (4 by maintainers)
Top Results From Across the Web
Unicode characters being replaced by question marks after ...
Unicode changed all of that - each character has a unique 8-bit assignment which means you can determine what it is based on...
Read more >List of Unicode characters that should be filtered in output?
It breaks javascript because strings cannot have newlines in them: var myString = " "; //SyntaxError: Unexpected token ILLEGAL.
Read more >Unquoted attribute values in HTML and CSS/JS selectors
The attribute value can remain unquoted if it doesn't contain spaces or any of " ' ` = < or > . Otherwise,...
Read more >Character Transformations - Unicode Security Guide
An application may choose to delete characters when invalid, illegal, or unexpected data is encountered. This can also be problematic if not handled...
Read more >ASCII and Unicode quotation marks
If you can use Unicode characters, nice directional quotation marks are available in the form of characters U+2018, U+2019, U+201C, and U+201D (as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just ran into the same problem as @patrick-steele-idem.
Worked around the issue by adding the following options to the minify command:
--no-evaluate --no-propertyLiterals
This disables the two plugins that are breaking the output code (babel-plugin-minify-constant-folding and babel-plugin-transform-property-literals).
In polymer cli i also get this code:
from jquery to break: https://github.com/Polymer/polymer-cli/issues/886