Fix TemplateParserV1 and FrontEndFileHandler not recognizing Google webfonts '.../css2?...' URL as CSS

This commit is contained in:
Kijin Sung 2024-01-10 13:09:01 +09:00
parent b591f023ef
commit e2cfa524d0
4 changed files with 30 additions and 2 deletions

View file

@ -628,7 +628,14 @@ class TemplateParser_v1
$doUnload = ($m[3] === 'unload');
$isRemote = !!preg_match('@^(https?:)?//@i', $attr['target']);
if(!$isRemote)
if($isRemote)
{
if (empty($pathinfo['extension']))
{
$pathinfo['extension'] = preg_match('/[\.\/](css|js)[0-9]?\b/', $attr['target'], $mx) ? $mx[1] : null;
}
}
else
{
if (preg_match('!^\\^/(.+)!', $attr['target'], $tmatches))
{