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

Href parsing in SVG use directive #5155

Closed
DylanPaulusSEL opened this issue Aug 8, 2018 · 2 comments
Closed

Href parsing in SVG use directive #5155

DylanPaulusSEL opened this issue Aug 8, 2018 · 2 comments

Comments

@DylanPaulusSEL
Copy link
Contributor

(https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href)
xlink:href is being deprecated for href

Version

2.3.0

Test Case

http://jsfiddle.net/uybeqc5r/

Steps to reproduce

Use loadSVGFromUrl/loadSVGFromString with an SVG <use /> tag that contains href instead of xlink:href. (<use href="#myId" />)

Expected Behavior

Should parse the SVG into the fabric canvas.

Actual Behavior

Throws a null reference error on xlink = el.getAttribute('xlink:href').substr(1) when using href.
image


Willing to make a PR for this if everything seems fine. Thinking of adding checks for either xlink:href and href. (eg. xlink = (el.getAttribute('xlink:href') || el.getAttribute('href')).substr(1)

@asturur
Copy link
Member

asturur commented Aug 8, 2018

it make sense to support href on top of xlink:href to do not immediately being completely incompatible with svg 2.

But we still focus on svg 1.1 ( with 1.2 addons where possible ) compatibility, so is not deprecated for us.

Most of svg2 features are really out of reach for us.

@asturur
Copy link
Member

asturur commented Aug 13, 2018

merged

@asturur asturur closed this as completed Aug 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants