mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-19 08:00:23 +00:00
fix($compile): empty normalized href should pass sanitation check
Sometimes IE returns an empty string for its normalized href on a tags. This should pass the sanitation check in $compile. Closes #2219, #2593
This commit is contained in:
parent
63414b9653
commit
3b2c6f09cb
1 changed files with 1 additions and 1 deletions
|
|
@ -293,7 +293,7 @@ function $CompileProvider($provide) {
|
|||
|
||||
// href property always returns normalized absolute url, so we can match against that
|
||||
normalizedVal = urlSanitizationNode.href;
|
||||
if (!normalizedVal.match(urlSanitizationWhitelist)) {
|
||||
if (normalizedVal !== '' && !normalizedVal.match(urlSanitizationWhitelist)) {
|
||||
this[key] = value = 'unsafe:' + normalizedVal;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue