aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.tabs.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-11-06 08:01:11 -0500
committerScott González <scott.gonzalez@gmail.com>2012-11-13 10:50:51 -0500
commitcdccd9956a7d524700cee2d8aa7101ac645eadc9 (patch)
tree74f381d985bcede3144cf3ca1660e75da44394ca /ui/jquery.ui.tabs.js
parent310dff10eab98f6649eac6a5aed05b43c7238393 (diff)
downloadjquery-ui-cdccd9956a7d524700cee2d8aa7101ac645eadc9.tar.gz
jquery-ui-cdccd9956a7d524700cee2d8aa7101ac645eadc9.zip
Tabs: Encode spaces from window.location. Fixes #8777 - Tabs fail in Safari 5.1 when window.location contains a space.
(cherry picked from commit c6b52db892703ba14153800dbf620db509acb9e6)
Diffstat (limited to 'ui/jquery.ui.tabs.js')
-rw-r--r--ui/jquery.ui.tabs.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js
index 0d920c3a1..8f09230c5 100644
--- a/ui/jquery.ui.tabs.js
+++ b/ui/jquery.ui.tabs.js
@@ -23,7 +23,12 @@ function getNextTabId() {
function isLocal( anchor ) {
return anchor.hash.length > 1 &&
- anchor.href.replace( rhash, "" ) === location.href.replace( rhash, "" );
+ 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" );
}
$.widget( "ui.tabs", {