question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] Removal of quotes for property names with special unicode still broken

See original GitHub issue

Despite 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:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
spudlycommented, Oct 11, 2017

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).

0reactions
jogibear9988commented, Nov 18, 2017

In polymer cli i also get this code:

 var identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+";

from jquery to break: https://github.com/Polymer/polymer-cli/issues/886

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found