mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fixed JS error in lib.js (fixes #3481)
This commit is contained in:
parent
b48aea131b
commit
d555b5b26e
@ -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 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user