-
Notifications
You must be signed in to change notification settings - Fork 27.5k
fix($location): parse xlink:href for SVGAElements #5472
Conversation
Thank you very much |
anchor.href = url; | ||
var abs = anchor.href; | ||
anchor.href = ''; | ||
return abs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have a nifty utility for this, check out urlResolve(url).href
in urlUtils.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I knew there was something somewhere, just couldn't find it! Thanks
otherwise this looks good. |
Before this fix, the xlink:href property of an SVG <a> element could not be parsed on click, as the property is an SVGAnimatedString rather than a DOMString. This patch parses the xlink:href's animVal into a DOMString in order to prevent an `Object #<SVGAnimatedString> has no method 'indexOf'` exception from being thrown, and also to update the location if necessary as expected.
@caitp thanks! |
@caitp next time please list all related issues and PRs in the commit message, I amended your PR to fix this. thanks a bunch for quick turnaround |
Sorry about that, I added the ones @Narretz mentioned, but didn't do a search for similar ones. Do you know of a good tool to search for matching issues on github? I've tried using the advanced search feature, but it tends to not find everything |
Before this fix, the xlink:href property of an SVG <a> element could not be parsed on click, as the property is an SVGAnimatedString rather than a DOMString. This patch parses the xlink:href's animVal into a DOMString in order to prevent an `Object #<SVGAnimatedString> has no method 'indexOf'` exception from being thrown, and also to update the location if necessary as expected. Closes angular#5472 Closes angular#5198 Closes angular#5199 Closes angular#4098 Closes angular#1420
Before this fix, the xlink:href property of an SVG <a> element could not be parsed on click, as the property is an SVGAnimatedString rather than a DOMString. This patch parses the xlink:href's animVal into a DOMString in order to prevent an `Object #<SVGAnimatedString> has no method 'indexOf'` exception from being thrown, and also to update the location if necessary as expected. Closes angular#5472 Closes angular#5198 Closes angular#5199 Closes angular#4098 Closes angular#1420
Before this fix, the xlink:href property of an SVG
<a>
element could not be parsed on click, as the property is an SVGAnimatedString rather than a DOMString.This patch parses the xlink:href's animVal into a DOMString in order to prevent an
Object #<SVGAnimatedString> has no method 'indexOf'
exception from being thrown, and also to update the location if necessary as expected.Fixes #5198, #5199, #4098, #1420