aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-12-05 17:19:14 -0500
committerScott González <scott.gonzalez@gmail.com>2012-12-05 17:19:14 -0500
commit1e5662ebe5a27d5ef0b8d60730b21771a2526547 (patch)
treec792d43dcaa32b26dfd785e7d981d38e29f9daeb /ui
parentf59f5a8b12d50c87ba6e2fe47a1804a23535b3cf (diff)
downloadjquery-ui-1e5662ebe5a27d5ef0b8d60730b21771a2526547.tar.gz
jquery-ui-1e5662ebe5a27d5ef0b8d60730b21771a2526547.zip
Tabs: Decode URIs before comparing. Fixes #8877 - Tabs: isLocal function issue in Safari 5.1.7.
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.tabs.js8
1 files changed, 2 insertions, 6 deletions
diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js
index dcb0c2768..bce0585a0 100644
--- a/ui/jquery.ui.tabs.js
+++ b/ui/jquery.ui.tabs.js
@@ -23,12 +23,8 @@ function getNextTabId() {
function isLocal( anchor ) {
return anchor.hash.length > 1 &&
- anchor.href.replace( rhash, "" ) ===
- location.href.replace( rhash, "" )
- // support: Safari 5.1
- // Safari 5.1 doesn't encode spaces in window.location
- // but it does encode spaces from anchors (#8777)
- .replace( /\s/g, "%20" );
+ decodeURIComponent( anchor.href.replace( rhash, "" ) ) ===
+ decodeURIComponent( location.href.replace( rhash, "" ) );
}
$.widget( "ui.tabs", {