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 <use> to use local resource instead of absolute path #938

Merged
merged 1 commit into from
Jul 16, 2022

Conversation

lele0108
Copy link
Contributor

@lele0108 lele0108 commented Jul 15, 2022

Previously when <svg>s were snapshotted, <use> tag href was serialized to absolute path. But one's that start with '#' should be a local resource and should not be serialized to absolute path and instead left as is.

Previously:
<use href="https://google.com/#resource-a"></use>

Which would not resolve the correct local resource.

Now:
<use href="#resource-a"></use>

Which correctly resolves the local svg resource. It looks like the xlink:href case is already handled (but that attribute is deprecated in new svg spec)

See: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/use

@lele0108 lele0108 mentioned this pull request Jul 15, 2022
1 task
Copy link
Member

@Yuyz0112 Yuyz0112 left a comment

Choose a reason for hiding this comment

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

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants