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

Fix hovering state when target contains special characters #2315

Merged
merged 1 commit into from
Mar 25, 2018

Conversation

panthony
Copy link
Contributor

@panthony panthony commented Mar 22, 2018

This PRs fixes the following issue:

CSS class names are NOT allowed spaces but every other characters is fine (https://www.w3.org/TR/CSS21/syndata.html#characters).

Since they are all prefixed by c3-targets- we do not have to care about the first character.

We simply need to escape in querySelector or in CSS if any.

I don't know if c3-target-XXX  is considered public or private api but this PR will break css/js based on this css class when target contains special characters.


close #1687

@kt3k
Copy link
Member

kt3k commented Mar 25, 2018

I confirmed this fixes the example of #1687

This change breaks the case when the data name contains special characters other than - and the user uses c3-target-XXX directly from their code. I think that's very rare usage. (possibly none)

The current replacing rule has an obvious defect, so I think nobody wants that behavior and it's ok to merge this.

@kt3k kt3k merged commit a3d129a into c3js:master Mar 25, 2018
@panthony panthony deleted the fix/highlight branch August 7, 2019 14:40
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.

When the column name includes sign, C3 cannot tell the difference between signs
2 participants