diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 71dbfbc1b2b..bacda98845d 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -2100,10 +2100,10 @@ function dol_print_error($db='',$error='')
$out.="".$langs->trans("PHP").": ".phpversion()."
\n";
//phpinfo(); // This is to show location of php.ini file
}
- $out.="".$langs->trans("Server").": ".$_SERVER["SERVER_SOFTWARE"]."
\n";;
+ $out.="".$langs->trans("Server").": ".$_SERVER["SERVER_SOFTWARE"]."
\n";
$out.="
\n";
- $out.="".$langs->trans("RequestedUrl").": ".$_SERVER["REQUEST_URI"]."
\n";;
- $out.="".$langs->trans("Referer").": ".(isset($_SERVER["HTTP_REFERER"])?$_SERVER["HTTP_REFERER"]:'')."
\n";;
+ $out.="".$langs->trans("RequestedUrl").": ".dol_htmlentities($_SERVER["REQUEST_URI"],ENT_COMPAT,'UTF-8')."
\n";
+ $out.="".$langs->trans("Referer").": ".(isset($_SERVER["HTTP_REFERER"])?dol_htmlentities($_SERVER["HTTP_REFERER"],ENT_COMPAT,'UTF-8'):'')."
\n";
$out.="".$langs->trans("MenuManager").": ".$conf->top_menu."
\n";
$out.="
\n";
$syslog.="url=".$_SERVER["REQUEST_URI"];