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

Avoid odd unicode chars in regexp #1994

Closed
WilcoFiers opened this issue Jan 22, 2020 · 2 comments
Closed

Avoid odd unicode chars in regexp #1994

WilcoFiers opened this issue Jan 22, 2020 · 2 comments
Assignees
Labels
color contrast Color contrast issues commons Issues in the common code (lib/commons) fix Bug fixes
Milestone

Comments

@WilcoFiers
Copy link
Contributor

We've noticed some issues executing regex with odd unicode characters in them. These are used here:

https://github.com/dequelabs/axe-core/blob/develop/lib/commons/text/unicode.js

Instead of using regexp, what we could do is use str.charCodeAt() to figure out if the string has characters we want to strip / check for. That way we can keep these things as character codes and don't have to put characters in memory old javascript VMs can't deal with.

@WilcoFiers WilcoFiers added fix Bug fixes color contrast Color contrast issues commons Issues in the common code (lib/commons) labels Jan 22, 2020
@WilcoFiers WilcoFiers added this to the Axe-core 3.5 milestone Jan 22, 2020
@straker straker self-assigned this Jan 23, 2020
@straker
Copy link
Contributor

straker commented Jan 27, 2020

@jeankaplansky no docs

@padmavemulapati
Copy link

DevTask

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
color contrast Color contrast issues commons Issues in the common code (lib/commons) fix Bug fixes
Projects
None yet
Development

No branches or pull requests

3 participants