Skip to content

Commit

Permalink
Tabs: Decode URIs before comparing. Fixes #8877 - Tabs: isLocal funct…
Browse files Browse the repository at this point in the history
…ion issue in Safari 5.1.7.
  • Loading branch information
scottgonzalez committed Dec 5, 2012
1 parent f59f5a8 commit 1e5662e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions ui/jquery.ui.tabs.js
Expand Up @@ -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", {
Expand Down

0 comments on commit 1e5662e

Please sign in to comment.