Skip to content
Permalink
Browse files
Tabs: Encode spaces from window.location. Fixes #8777 - Tabs fail in …
…Safari 5.1 when window.location contains a space.

(cherry picked from commit c6b52db)
  • Loading branch information
scottgonzalez committed Nov 13, 2012
1 parent 310dff1 commit cdccd9956a7d524700cee2d8aa7101ac645eadc9
Showing with 6 additions and 1 deletion.
  1. +6 −1 ui/jquery.ui.tabs.js
@@ -23,7 +23,12 @@ function getNextTabId() {

function isLocal( anchor ) {
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", {

0 comments on commit cdccd99

Please sign in to comment.