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(),
|
// For embedded pages, remove the dialog hash key as in getFilePath(),
|
||||||
// otherwise the Data Url won't match the id of the embedded Page.
|
// otherwise the Data Url won't match the id of the embedded Page.
|
||||||
return u.hash.split( dialogHashKey )[0].replace( /^#/, "" );
|
return u.hash.split( dialogHashKey )[0].replace( /^#/, "" );
|
||||||
} else if ( path.isSameDomain( u, documentBase ) ) {
|
} else if ( path.isSameDomain( u, document ) ) {
|
||||||
return u.hrefNoHash.replace( documentBase.domain, "" );
|
return u.hrefNoHash.replace( document.domain, "" );
|
||||||
}
|
}
|
||||||
return absUrl;
|
return absUrl;
|
||||||
},
|
},
|
||||||
@ -227,7 +227,7 @@
|
|||||||
|
|
||||||
//return a url path with the window's location protocol/hostname/pathname removed
|
//return a url path with the window's location protocol/hostname/pathname removed
|
||||||
clean: function( url ) {
|
clean: function( url ) {
|
||||||
return url.replace( documentBase.domain, "" );
|
return url.replace( document.domain, "" );
|
||||||
},
|
},
|
||||||
|
|
||||||
//just return the url without an initial #
|
//just return the url without an initial #
|
||||||
@ -244,7 +244,7 @@
|
|||||||
//could be mailto, etc
|
//could be mailto, etc
|
||||||
isExternal: function( url ) {
|
isExternal: function( url ) {
|
||||||
var u = path.parseUrl( 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 ) {
|
hasProtocol: function( url ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user