From d555b5b26ee97f574c862e62c040d33a965a8736 Mon Sep 17 00:00:00 2001 From: Aden Fraser Date: Wed, 11 Feb 2015 15:19:08 +0000 Subject: [PATCH] Fixed JS error in lib.js (fixes #3481) --- admin/javascript/lib.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/admin/javascript/lib.js b/admin/javascript/lib.js index a8ad7b6d2..3524c9724 100644 --- a/admin/javascript/lib.js +++ b/admin/javascript/lib.js @@ -194,8 +194,8 @@ // For embedded pages, remove the dialog hash key as in getFilePath(), // otherwise the Data Url won't match the id of the embedded Page. return u.hash.split( dialogHashKey )[0].replace( /^#/, "" ); - } else if ( path.isSameDomain( u, documentBase ) ) { - return u.hrefNoHash.replace( documentBase.domain, "" ); + } else if ( path.isSameDomain( u, document ) ) { + return u.hrefNoHash.replace( document.domain, "" ); } return absUrl; }, @@ -227,7 +227,7 @@ //return a url path with the window's location protocol/hostname/pathname removed clean: function( url ) { - return url.replace( documentBase.domain, "" ); + return url.replace( document.domain, "" ); }, //just return the url without an initial # @@ -244,7 +244,7 @@ //could be mailto, etc isExternal: function( url ) { var u = path.parseUrl( url ); - return u.protocol && u.domain !== documentUrl.domain ? true : false; + return u.protocol && u.domain !== document.domain ? true : false; }, hasProtocol: function( url ) {