From 75352812a8d15161865b7830804245966cb68c11 Mon Sep 17 00:00:00 2001 From: Johannes Neumeier Date: Fri, 29 Nov 2013 15:49:45 +0200 Subject: [PATCH] attempted fix for issue #339 - no more including host in hash on IE 8 and 9 --- scripts/bundled-uncompressed/html4+html5/jquery.history.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/bundled-uncompressed/html4+html5/jquery.history.js b/scripts/bundled-uncompressed/html4+html5/jquery.history.js index dc47ce7c..5133728c 100644 --- a/scripts/bundled-uncompressed/html4+html5/jquery.history.js +++ b/scripts/bundled-uncompressed/html4+html5/jquery.history.js @@ -1789,7 +1789,11 @@ if (typeof JSON !== 'object') { // We are in a if statement as when pushState is not emulated // The actual url these short urls are relative to can change // So within the same session, we the url may end up somewhere different - shortUrl = shortUrl.replace(baseUrl,''); + + // also make sure to remove the trailing slash before removing the baseUrl + // from shortUrl, or it will not match the host + var baseUrlWithoutTrailingSlash = baseUrl.replace(/\/$/gi, ''); + shortUrl = shortUrl.replace(baseUrlWithoutTrailingSlash,''); } // Trim rootUrl