diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index b4b2adcde8b..5004a42084c 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -829,6 +829,8 @@ function checkVal($out = '', $check = 'alphanohtml', $filter = null, $options = // No need to use a loop here, this step is not to sanitize (this is done at next step, this is to try to save chars, even if they are // using a non coventionnel way to be encoded, to not have them sanitized just after) $out = preg_replace_callback('/&#(x?[0-9][0-9a-f]+;?)/i', 'realCharForNumericEntities', $out); + //$out = preg_replace_callback('/&#(x?[0-9][0-9a-f]+;?)/i', function ($m) { return realCharForNumericEntities($m); }, $out); + // Now we remove all remaining HTML entities starting with a number. We don't want such entities. $out = preg_replace('/&#x?[0-9]+/i', '', $out); // For example if we have javascript with an entities without the ; to hide the 'a' of 'javascript'. diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 028ed31a618..4280634c7dd 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1599,12 +1599,17 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr dol_syslog("Warning: module ".$modcss." declared a css path file into its descriptor that is empty.", LOG_WARNING); } // cssfile is a relative path - print ''."\n".''."\n"; + } else { + dol_syslog("Warning: module ".$modcss." declared a css path file for a file we can't find.", LOG_WARNING); } - print '">'."\n"; } } } @@ -1738,7 +1743,12 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr $filesjs = (array) $filesjs; // To be sure filejs is an array foreach ($filesjs as $jsfile) { // jsfile is a relative path - print ''."\n".''."\n"; + $urlforjs = dol_buildpath($jsfile, 1); + if ($urlforjs) { + print ''."\n".''."\n"; + } else { + dol_syslog("Warning: module ".$modjs." declared a js path file for a file we can't find.", LOG_WARNING); + } } } }