-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
correct DOMException when data name contains unicode #2686
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2686 +/- ##
==========================================
- Coverage 81.02% 81.01% -0.01%
==========================================
Files 59 59
Lines 4633 4636 +3
==========================================
+ Hits 3754 3756 +2
- Misses 879 880 +1
Continue to review full report at Codecov.
|
3 similar comments
Codecov Report
@@ Coverage Diff @@
## master #2686 +/- ##
==========================================
- Coverage 81.02% 81.01% -0.01%
==========================================
Files 59 59
Lines 4633 4636 +3
==========================================
+ Hits 3754 3756 +2
- Misses 879 880 +1
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #2686 +/- ##
==========================================
- Coverage 81.02% 81.01% -0.01%
==========================================
Files 59 59
Lines 4633 4636 +3
==========================================
+ Hits 3754 3756 +2
- Misses 879 880 +1
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #2686 +/- ##
==========================================
- Coverage 81.02% 81.01% -0.01%
==========================================
Files 59 59
Lines 4633 4636 +3
==========================================
+ Hits 3754 3756 +2
- Misses 879 880 +1
Continue to review full report at Codecov.
|
return window.CSS.escape(targetClass); | ||
} | ||
|
||
// fallback on imperfect method for old browsers (does not handles unicode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR uses CSS.escape or fallback to previous method if not available
I like this approach!
LGTM
This PR closes #2353
In the end I did not introduce a new dependency.
I though about #2407 where size really matters and I did not feel like adding this polyfill for everyone.
This PR uses
CSS.escape
or fallback to previous method if not available, meaning the issue would still occurs for old browsers (ex: IE) but I think we'd better off explaining this and leaving the responsability to the user to embed a polyfill if needed.