Skip to content
Permalink
Browse files

Tabs: Decode URIs before comparing. Fixes #8877 - Tabs: isLocal funct…

…ion issue in Safari 5.1.7.
  • Loading branch information...
scottgonzalez committed Dec 5, 2012
1 parent f59f5a8 commit 1e5662ebe5a27d5ef0b8d60730b21771a2526547
Showing with 2 additions and 6 deletions.
  1. +2 −6 ui/jquery.ui.tabs.js
@@ -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", {

0 comments on commit 1e5662e

Please sign in to comment.
You can’t perform that action at this time.