diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index ffdf161fc7a..2d76c26e917 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -2444,9 +2444,12 @@ function randomColor($min = 0, $max = 255) * @param string $string String to encode * @return string String encoded */ -function dolEscapeXML($string) +if (! function_exists('dolEscapeXML')) { - return strtr($string, array('\''=>''','"'=>'"','&'=>'&','<'=>'<','>'=>'>')); + function dolEscapeXML($string) + { + return strtr($string, array('\''=>''','"'=>'"','&'=>'&','<'=>'<','>'=>'>')); + } } /**