Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fix($location) solve when url is "javascript:" or "mailto:" #8407

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/ng/location.js
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,9 @@ function $LocationProvider(){
}

var absHref = elm.prop('href');

// Ignore when url is started with javascript: or mailto:
if (absHref.toString().indexOf('javascript:') === 0 || absHref.toString().indexOf('mailto:') === 0) return;

if (isObject(absHref) && absHref.toString() === '[object SVGAnimatedString]') {
// SVGAnimatedString.animVal should be identical to SVGAnimatedString.baseVal, unless during
Expand Down