Skip to content

A few fixes in convertToTspans #736

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

Merged
merged 3 commits into from
Jul 12, 2016
Merged

A few fixes in convertToTspans #736

merged 3 commits into from
Jul 12, 2016

Conversation

etpinard
Copy link
Contributor

resolves #642

See d58d3be and f6a5c67

etpinard added 3 commits July 11, 2016 16:19
- check for white list of anchor attributes
- check for correct 'xlink:show' value
- fixes #642
- strip only the leading '='
- replace & with '&' to make DOMParser happy
- wrap resulting href in ""
@etpinard etpinard added bug something broken status: reviewable labels Jul 11, 2016
@@ -105,6 +105,21 @@ describe('svg+text utils', function() {
assertAnchorLink(node, 'mailto:[email protected]');
});

it('wrap XSS attacks in href', function() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@scjody

The previous commit d58d3be also appears to have fix the XSS issue discovered in https://github.com/plotly/streambed/issues/7056 - would you mind reviewing this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good to me! Let me know when it's on prod and I'll play with it a bit to be extra sure.

@etpinard etpinard merged commit 12bed39 into master Jul 12, 2016
@etpinard etpinard deleted the convert-to-svg branch July 12, 2016 14:38
rreusser added a commit that referenced this pull request Jul 27, 2016
rreusser added a commit that referenced this pull request Jul 27, 2016
rreusser added a commit that referenced this pull request Jul 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Link text with query params does not work
2 participants