Skip to content

Commit 1e5662e

Browse files
committed
Tabs: Decode URIs before comparing. Fixes #8877 - Tabs: isLocal function issue in Safari 5.1.7.
1 parent f59f5a8 commit 1e5662e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

ui/jquery.ui.tabs.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,8 @@ function getNextTabId() {
2323

2424
function isLocal( anchor ) {
2525
return anchor.hash.length > 1 &&
26-
anchor.href.replace( rhash, "" ) ===
27-
location.href.replace( rhash, "" )
28-
// support: Safari 5.1
29-
// Safari 5.1 doesn't encode spaces in window.location
30-
// but it does encode spaces from anchors (#8777)
31-
.replace( /\s/g, "%20" );
26+
decodeURIComponent( anchor.href.replace( rhash, "" ) ) ===
27+
decodeURIComponent( location.href.replace( rhash, "" ) );
3228
}
3329

3430
$.widget( "ui.tabs", {

0 commit comments

Comments
 (0)