mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX: Updated protocol check to become more stringent.
This commit is contained in:
parent
d21fd1f0bb
commit
b1ba8bd05b
@ -62,9 +62,8 @@ class HTTP {
|
||||
public static function absoluteURLs($html) {
|
||||
$html = str_replace('$CurrentPageURL', $_SERVER['REQUEST_URI'], $html);
|
||||
return HTTP::urlRewriter($html, function($url) {
|
||||
//no need to rewrite, if uri has a protocol
|
||||
//(determined here by existence of reserved URI character ":")
|
||||
if(stripos($url, ":") !== false){
|
||||
//no need to rewrite, if uri has a protocol (determined here by existence of reserved URI character ":")
|
||||
if(preg_match('/^\w+:/', $url)){
|
||||
return $url;
|
||||
}
|
||||
return Director::absoluteURL($url, true);
|
||||
|
Loading…
Reference in New Issue
Block a user