Merge pull request #12961 from homer8173/patch-17

Protocol is not anymore used in url
This commit is contained in:
Laurent Destailleur 2020-01-29 22:49:01 +01:00 committed by GitHub
commit a8d01f41db
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) foreach ($arrayofcss as $cssfile)
{ {
if (preg_match('/^http/i', $cssfile)) if (preg_match('/^(http|\/\/)/i', $cssfile))
{ {
$urltofile = $cssfile; $urltofile = $cssfile;
} }
@ -1497,7 +1497,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
print '<!-- Includes JS added by page -->'."\n"; print '<!-- Includes JS added by page -->'."\n";
foreach ($arrayofjs as $jsfile) foreach ($arrayofjs as $jsfile)
{ {
if (preg_match('/^http/i', $jsfile)) if (preg_match('/^(http|\/\/)/i', $jsfile))
{ {
print '<script src="'.$jsfile.'"></script>'."\n"; print '<script src="'.$jsfile.'"></script>'."\n";
} }