mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
Allow protocol-relative URLs in <load> syntax
This commit is contained in:
parent
2cfe4a1d7d
commit
cd823663b4
2 changed files with 5 additions and 1 deletions
|
|
@ -345,6 +345,10 @@ class FrontEndFileHandler extends Handler
|
|||
{
|
||||
$path = './' . $path;
|
||||
}
|
||||
elseif(!strncmp($path, '//', 2))
|
||||
{
|
||||
return $path;
|
||||
}
|
||||
|
||||
$path = preg_replace('@/\./|(?<!:)\/\/@', '/', $path);
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue