mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Tabs: Encode spaces from window.location. Fixes #8777 - Tabs fail in Safari 5.1 when window.location contains a space.
This commit is contained in:
parent
886d6fe9fb
commit
c6b52db892
7
ui/jquery.ui.tabs.js
vendored
7
ui/jquery.ui.tabs.js
vendored
@ -23,7 +23,12 @@ function getNextTabId() {
|
|||||||
|
|
||||||
function isLocal( anchor ) {
|
function isLocal( anchor ) {
|
||||||
return anchor.hash.length > 1 &&
|
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", {
|
$.widget( "ui.tabs", {
|
||||||
|
Loading…
Reference in New Issue
Block a user