Allow protocol-relative URLs in <load> syntax

This commit is contained in:
Kijin Sung 2015-02-25 16:05:35 +09:00
parent 2cfe4a1d7d
commit cd823663b4
2 changed files with 5 additions and 1 deletions

View file

@ -345,6 +345,10 @@ class FrontEndFileHandler extends Handler
{
$path = './' . $path;
}
elseif(!strncmp($path, '//', 2))
{
return $path;
}
$path = preg_replace('@/\./|(?<!:)\/\/@', '/', $path);

View file

@ -653,7 +653,7 @@ class TemplateHandler
$metafile = '';
$pathinfo = pathinfo($attr['target']);
$doUnload = ($m[3] === 'unload');
$isRemote = !!preg_match('@^https?://@i', $attr['target']);
$isRemote = !!preg_match('@^(https?:)?//@i', $attr['target']);
if(!$isRemote)
{