Skip to content
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

Merged
merged 1 commit into from
Aug 25, 2019

Conversation

panthony
Copy link
Contributor

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.

@codecov-io
Copy link

Codecov Report

Merging #2686 into master will decrease coverage by <.01%.
The diff coverage is 75%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
src/class-utils.js 95.83% <75%> (-1.27%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4cb80e7...513cdaa. Read the comment docs.

3 similar comments
@codecov-io
Copy link

Codecov Report

Merging #2686 into master will decrease coverage by <.01%.
The diff coverage is 75%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
src/class-utils.js 95.83% <75%> (-1.27%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4cb80e7...513cdaa. Read the comment docs.

@codecov-io
Copy link

Codecov Report

Merging #2686 into master will decrease coverage by <.01%.
The diff coverage is 75%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
src/class-utils.js 95.83% <75%> (-1.27%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4cb80e7...513cdaa. Read the comment docs.

@codecov-io
Copy link

codecov-io commented Aug 19, 2019

Codecov Report

Merging #2686 into master will decrease coverage by <.01%.
The diff coverage is 75%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
src/class-utils.js 95.83% <75%> (-1.27%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4cb80e7...513cdaa. Read the comment docs.

return window.CSS.escape(targetClass);
}

// fallback on imperfect method for old browsers (does not handles unicode)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! 👍

Copy link
Member

@kt3k kt3k left a 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

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 this pull request may close these issues.

Uncaught DOMException when data label contains unicode
3 participants