From fc8c9baa399c33956133cdb6892fc7007430d299 Mon Sep 17 00:00:00 2001 From: Anders Hessellund Jensen Date: Mon, 6 May 2013 22:18:42 +0200 Subject: 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 --- src/ng/compile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; } } -- cgit v1.2.3