From 0a5050eb3c1f1ed84134f23a44b97a7261114060 Mon Sep 17 00:00:00 2001 From: Thibault Leruitte Date: Wed, 4 Apr 2012 16:41:50 +0200 Subject: fix($location): don't rewrite links to different base paths links to different base paths should not be left untouched --- src/ng/location.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/ng/location.js b/src/ng/location.js index 6bed261f..9feee5ad 100644 --- a/src/ng/location.js +++ b/src/ng/location.js @@ -503,6 +503,9 @@ function $LocationProvider(){ var href = elm.attr('href'); if (!href || isDefined(elm.attr('ng-ext-link')) || elm.attr('target')) return; + // link to different base path + if (href[0] === '/' && href.indexOf(pathPrefix) !== 0) return; + // remove same domain from full url links (IE7 always returns full hrefs) href = href.replace(absUrlPrefix, ''); -- cgit v1.2.3