mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 09:38:23 +01:00
Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/comm/propal/class/propal.class.php htdocs/projet/tasks/time.php
This commit is contained in:
@@ -8246,6 +8246,9 @@ function dol_htmlwithnojs($stringtoencode, $nouseofiframesandbox = 0, $check = '
|
||||
}
|
||||
}
|
||||
|
||||
// Clear ZERO WIDTH NO-BREAK SPACE, ZERO WIDTH SPACE, ZERO WIDTH JOINER
|
||||
$out = preg_replace('/[\x{200B}-\x{200D}\x{FEFF}]/u', ' ', $out);
|
||||
|
||||
// Clean some html entities that are useless so text is cleaner
|
||||
$out = preg_replace('/&(tab|newline);/i', ' ', $out);
|
||||
|
||||
@@ -8356,6 +8359,7 @@ function dol_htmlentitiesbr($stringtoencode, $nl2brmode = 0, $pagecodefrom = 'UT
|
||||
if ($removelasteolbr) {
|
||||
$newstring = preg_replace('/<br>$/i', '', $newstring); // Remove last <br> (remove only last one)
|
||||
}
|
||||
$newstring = preg_replace('/[\x{200B}-\x{200D}\x{FEFF}]/u', ' ', $newstring);
|
||||
$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__' => '"'));
|
||||
|
||||
Reference in New Issue
Block a user