Some SVG attributes aren't correctly handled, for example viewBox#52
Merged
remarkablemark merged 4 commits intoremarkablemark:masterfrom May 13, 2018
Merged
Some SVG attributes aren't correctly handled, for example viewBox#52remarkablemark merged 4 commits intoremarkablemark:masterfrom
remarkablemark merged 4 commits intoremarkablemark:masterfrom
Conversation
remarkablemark
requested changes
May 11, 2018
test/helpers/mocks.json
Outdated
| "comment": "<!-- comment -->", | ||
| "doctype": "<!DOCTYPE html>" | ||
| "doctype": "<!DOCTYPE html>", | ||
| "svg": "<svg viewBox=\"0 0 512 512\" id=\"foo\">Inner</svg>" |
Owner
There was a problem hiding this comment.
Do you mind moving this line under svg property?
{
"html": {
// ...
},
"svg": {
"simple": "<svg viewBox=\"0 0 512 512\" id=\"foo\">Inner</svg>",
// ...
}
}I should also rename this file to data.js but you don't have to do that in this PR
Contributor
Author
|
As requested. Thanks for the quick feedback on this. |
remarkablemark
approved these changes
May 13, 2018
Owner
|
Thanks for the PR @phawxby, I will make a release shortly. Update: |
d-lazarev
pushed a commit
to d-lazarev/html-react-parser
that referenced
this pull request
Apr 5, 2019
Some SVG attributes aren't correctly handled, for example viewBox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The implementation assumes all attributes are lowercase, this isn't the case for SVGs. As a result when trying to map attributes to props the
viewBoxattribute breaks.https://unpkg.com/react-dom@15.6.2/lib/SVGDOMPropertyConfig.js