Permalink
Browse files

Tabs: Encode spaces from window.location. Fixes #8777 - Tabs fail in …

…Safari 5.1 when window.location contains a space.
  • Loading branch information...
scottgonzalez committed Nov 6, 2012
1 parent 886d6fe commit c6b52db892703ba14153800dbf620db509acb9e6
Showing with 6 additions and 1 deletion.
  1. +6 −1 ui/jquery.ui.tabs.js
View
@@ -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 c6b52db

Please sign in to comment.