Better compatibility

This commit is contained in:
Laurent Destailleur 2019-04-01 21:14:15 +02:00
parent 8fe1be1a67
commit 7db443e8ab

View File

@ -2444,10 +2444,13 @@ function randomColor($min = 0, $max = 255)
* @param string $string String to encode * @param string $string String to encode
* @return string String encoded * @return string String encoded
*/ */
if (! function_exists('dolEscapeXML'))
{
function dolEscapeXML($string) function dolEscapeXML($string)
{ {
return strtr($string, array('\''=>'&apos;','"'=>'&quot;','&'=>'&amp;','<'=>'&lt;','>'=>'&gt;')); return strtr($string, array('\''=>'&apos;','"'=>'&quot;','&'=>'&amp;','<'=>'&lt;','>'=>'&gt;'));
} }
}
/** /**
* Return automatic or manual in current language * Return automatic or manual in current language