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:
committed by
Pete Bacon Darwin
parent
63414b9653
commit
3b2c6f09cb
+1
-1
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user