Remove xmlns:xlink in removeXMLNS plugin#1508
Merged
TrySound merged 1 commit intosvg:masterfrom Oct 15, 2021
Merged
Conversation
xmlns:xlink is also not required in SVGs embedded in HTML
Member
|
Hi @devongovett. Thanks for PR. I think removeUnusedNS.js removes xmlns:xlink. |
Contributor
Author
|
That only removes it if it's unused though. In this case, it's always safe to remove xlink:href in HTML. Since this plugin is opt-in, I think it makes sense to do it here as well. |
Member
|
I think it's better to create a separate plugin which removes xlink namespace from xlink:herf as well. |
TrySound
added a commit
that referenced
this pull request
Aug 22, 2021
Ref #1508 The new plugin removes xmlns:xlink from <svg> and replaces xlink:href with href attribute. xlink namespace is obsolete in SVG 2. Href attribute is recommended replacement to xlink:href. This plugin will be enabled by default in SVGO 3. See https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/href
Member
|
I think it should be safe enough. We can always revert if somebody come with issues. |
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.
xmlns:xlink is also not required in SVGs embedded in HTML