mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Tabs: Decode URIs before comparing. Fixes #8877 - Tabs: isLocal function issue in Safari 5.1.7.
This commit is contained in:
parent
f59f5a8b12
commit
1e5662ebe5
8
ui/jquery.ui.tabs.js
vendored
8
ui/jquery.ui.tabs.js
vendored
@ -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", {
|
||||
|
Loading…
Reference in New Issue
Block a user