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

commented Aug 19, 2019

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

This comment has been minimized.

Copy link

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.

3 similar comments
@codecov-io

This comment has been minimized.

Copy link

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.

@codecov-io

This comment has been minimized.

Copy link

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.

@codecov-io

This comment has been minimized.

Copy link

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)

This comment has been minimized.

Copy link
@kt3k

kt3k Aug 25, 2019

Member

nice! 👍

@kt3k
kt3k approved these changes Aug 25, 2019
Copy link
Member

left a comment

This PR uses CSS.escape or fallback to previous method if not available

I like this approach!

LGTM

@kt3k kt3k merged commit 7f49040 into c3js:master Aug 25, 2019
4 checks passed
4 checks passed
ci/circleci: docs Your tests passed on CircleCI!
Details
ci/circleci: test_on_node10 Your tests passed on CircleCI!
Details
ci/circleci: test_on_node8 Your tests passed on CircleCI!
Details
circleci/htdocs preview build succes!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.