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: ensure generated svg ids are escaped #1209

Merged
merged 1 commit into from
Sep 18, 2020
Merged

fix: ensure generated svg ids are escaped #1209

merged 1 commit into from
Sep 18, 2020

Conversation

ivan-aksamentov
Copy link
Member

@ivan-aksamentov ivan-aksamentov commented Sep 18, 2020

Description of proposed changes

This ensures that runtime-generated HTML id properties are correctly sanitized, in particular, that invalid characters are removed or escaped.

Added dependencies:

css.escape as a polyfill for CSS.escape() (not available in IE)

There might be more places requiring sanitizaton.

Related issue(s)

Contributes to #1208

Testing

See linked issue.

@jameshadfield jameshadfield temporarily deployed to auspice-fix-unescaped-c-24fuxk September 18, 2020 21:31 Inactive
Copy link
Member

@jameshadfield jameshadfield left a comment

Choose a reason for hiding this comment

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

Thanks @ivan-aksamentov -- it's much nicer to switch from a regex to css.escape here

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.

2 participants