aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng
diff options
context:
space:
mode:
authorAnders Hessellund Jensen2013-05-06 22:18:42 +0200
committerPete Bacon Darwin2013-07-03 23:51:41 +0100
commitfc8c9baa399c33956133cdb6892fc7007430d299 (patch)
tree215e646a6abeaf33418a298aa871d1fc90f2c6fb /src/ng
parenta59a5f386a96f6b208acea78ab8233cb88180ce7 (diff)
downloadangular.js-fc8c9baa399c33956133cdb6892fc7007430d299.tar.bz2
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
Diffstat (limited to 'src/ng')
-rw-r--r--src/ng/compile.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ng/compile.js b/src/ng/compile.js
index e1dfda6f..b33e830a 100644
--- a/src/ng/compile.js
+++ b/src/ng/compile.js
@@ -298,7 +298,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;
}
}