diff options
author | Scott González <scott.gonzalez@gmail.com> | 2012-11-06 08:01:11 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-11-06 08:01:11 -0500 |
commit | c6b52db892703ba14153800dbf620db509acb9e6 (patch) | |
tree | c424ddcaa5b31081006ad570c607a022d34add13 /ui/jquery.ui.tabs.js | |
parent | 886d6fe9fb8bcbf5e4e968bdd535a0fbcf2b88f7 (diff) | |
download | jquery-ui-c6b52db892703ba14153800dbf620db509acb9e6.tar.gz jquery-ui-c6b52db892703ba14153800dbf620db509acb9e6.zip |
Tabs: Encode spaces from window.location. Fixes #8777 - Tabs fail in Safari 5.1 when window.location contains a space.
Diffstat (limited to 'ui/jquery.ui.tabs.js')
-rw-r--r-- | ui/jquery.ui.tabs.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js index f81771434..49b6d7bf1 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", { |