From f5a4f32b0f494e38808bd2b79d434979794723c9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 19 Jul 2012 18:03:25 +0200 Subject: [PATCH] [ bug #445 ] Hex escaping in descriptions --- htdocs/core/lib/functions.lib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 34e3d32fe3e..ad276af09fb 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3328,7 +3328,8 @@ function dol_textishtml($msg,$option=0) elseif (preg_match('//i',$msg)) return true; elseif (preg_match('//i',$msg)) return true; - elseif (preg_match('/&[A-Z0-9]{1,6};/i',$msg)) return true; + elseif (preg_match('/&[A-Z0-9]{1,6};/i',$msg)) return true; // Html entities names (http://www.w3schools.com/tags/ref_entities.asp) + elseif (preg_match('/&#[0-9]{2,3};/i',$msg)) return true; // Html entities numbers (http://www.w3schools.com/tags/ref_entities.asp) return false; } }