From 33a4888341cfe22abd18373aeca318a59d40e760 Mon Sep 17 00:00:00 2001 From: Norbert Penel Date: Wed, 29 Jan 2020 14:25:23 +0100 Subject: [PATCH] Protocol is not anymore used in url Since https expension, people do not specify protocol, so browsers propage the protocol used in parent page --- htdocs/main.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index a6de7819237..041fda15ea9 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -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 ''."\n"; foreach ($arrayofjs as $jsfile) { - if (preg_match('/^http/i', $jsfile)) + if (preg_match('/^(http|\/\/)/i', $jsfile)) { print ''."\n"; }