diff --git a/ChangeLogMaintlog b/ChangeLogMaintlog index e05989d554ce7..640d429a02835 100644 --- a/ChangeLogMaintlog +++ b/ChangeLogMaintlog @@ -1,5 +1,8 @@ # CHANGELOG 19.0 MAINTLOG FOR [DOLIBARR ERP CRM](https://www.dolibarr.org) +* 24/07/24 * +- NEW : DA025205 - BACKPORT de la [PR Standard](https://github.com/Dolibarr/dolibarr/pull/30257). + * 13/05/24 * - NEW : Backport de la [PR Standard](https://github.com/Dolibarr/dolibarr/pull/29629) pour ajouter une conf cachée **MAIN_REMOVE_DROPDOWN_CREATE_BUTTONS_ON_ORDER**, pour afficher l'ancienne version des boutons de création diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 1d386bfc94d20..2a5eeb99b6e10 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -7704,6 +7704,14 @@ function dol_htmlwithnojs($stringtoencode, $nouseofiframesandbox = 0, $check = ' $out = 'InvalidHTMLStringCantBeCleaned '.$e->getMessage(); } } + /** + * BACKPORT a supprimer pour la mdv en v20 - DA025205 + */ + //Clear ZERO WIDTH NO-BREAK SPACE, ZERO WIDTH SPACE, ZERO WIDTH JOINER + $out = preg_replace('/[\x{200B}-\x{200D}\x{FEFF}]/u', ' ', $out); + /** + * end BACKPORT + */ // Clean some html entities that are useless so text is cleaner $out = preg_replace('/&(tab|newline);/i', ' ', $out); @@ -7809,6 +7817,13 @@ function dol_htmlentitiesbr($stringtoencode, $nl2brmode = 0, $pagecodefrom = 'UT if ($removelasteolbr) { $newstring = preg_replace('/
$/i', '', $newstring); // Remove last
(remove only last one) } + /** + * BACKPORT a supprimer pour la mdv en v20 - DA025205 + */ + $newstring = preg_replace('/[\x{200B}-\x{200D}\x{FEFF}]/u', ' ', $newstring); + /** + * end BACKPORT + */ $newstring = strtr($newstring, array('&'=>'__and__', '<'=>'__lt__', '>'=>'__gt__', '"'=>'__dquot__')); $newstring = dol_htmlentities($newstring, ENT_COMPAT, $pagecodefrom); // Make entity encoding $newstring = strtr($newstring, array('__and__'=>'&', '__lt__'=>'<', '__gt__'=>'>', '__dquot__'=>'"'));