From 679cb8a74a684454fe38fa9e1ddad396bb598c52 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Sun, 13 May 2012 21:53:19 -0700 Subject: fix($browser/$location): single quote in url causes infinite digest in FF The real issue is in FF, see https://bugzilla.mozilla.org/show_bug.cgi?id=407172. FF overly encodes stuff which breaks our expectations and then we fail .url() != currentUrl.absUrl() comparison unexpectidly, which leads to infinite digest. The workaround is to correct for this inconsistency in $browser and decode any single quotes in urls. Closes #920 --- src/ng/browser.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/ng/browser.js') diff --git a/src/ng/browser.js b/src/ng/browser.js index 6acb8baa..16a5582f 100644 --- a/src/ng/browser.js +++ b/src/ng/browser.js @@ -165,7 +165,8 @@ function Browser(window, document, $log, $sniffer) { return self; // getter } else { - return location.href; + // the replacement is a workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=407172 + return location.href.replace(/%27/g,"'"); } }; -- cgit v1.2.3