Protocol is not anymore used in url

Since https expension, people do not specify protocol, so browsers propage the protocol used in parent page
This commit is contained in:
Norbert Penel 2020-01-29 14:25:23 +01:00 committed by GitHub
parent fe7344dd99
commit 33a4888341
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1345,7 +1345,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
{
foreach ($arrayofcss as $cssfile)
{
if (preg_match('/^http/i', $cssfile))
if (preg_match('/^(http|\/\/)/i', $cssfile))
{
$urltofile = $cssfile;
}
@ -1497,7 +1497,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
print '<!-- Includes JS added by page -->'."\n";
foreach ($arrayofjs as $jsfile)
{
if (preg_match('/^http/i', $jsfile))
if (preg_match('/^(http|\/\/)/i', $jsfile))
{
print '<script src="'.$jsfile.'"></script>'."\n";
}