From c812f09f7ca1d34bf904247230c2e159a66a8e35 Mon Sep 17 00:00:00 2001 From: Nikolaus Rosenmayr Date: Thu, 13 Jun 2013 20:34:23 +0200 Subject: [PATCH] Tabs: additional check against base href attribute if there is one. Fixed #7822, - ui.tabs with tag --- ui/jquery.ui.tabs.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js index 4362421db7c..6967707c8d1 100644 --- a/ui/jquery.ui.tabs.js +++ b/ui/jquery.ui.tabs.js @@ -26,9 +26,15 @@ function isLocal( anchor ) { // IE7 doesn't normalize the href property when set via script (#9317) anchor = anchor.cloneNode( false ); + var base = $( "head > base[href]" ); return anchor.hash.length > 1 && - decodeURIComponent( anchor.href.replace( rhash, "" ) ) === - decodeURIComponent( location.href.replace( rhash, "" ) ); + ( + decodeURIComponent( anchor.href.replace( rhash, "" ) ) === + decodeURIComponent( location.href.replace( rhash, "" ) ) || + + base.length && decodeURIComponent( anchor.href.replace( rhash, "" ) ) === + decodeURIComponent( base.attr("href").replace( rhash, "" ) ) + ); } $.widget( "ui.tabs", {