From 7db443e8abfede3950ae68cd3694571fbf837dfa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 1 Apr 2019 21:14:15 +0200 Subject: [PATCH] Better compatibility --- htdocs/core/lib/functions2.lib.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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('\''=>''','"'=>'"','&'=>'&','<'=>'<','>'=>'>')); + } } /**