Skip to content

Commit

Permalink
BACKPORT DA025205
Browse files Browse the repository at this point in the history
  • Loading branch information
atm-lucasmantegari committed Jul 24, 2024
1 parent bb78016 commit e1e0595
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ChangeLogMaintlog
Original file line number Diff line number Diff line change
@@ -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

Expand Down
15 changes: 15 additions & 0 deletions htdocs/core/lib/functions.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -7809,6 +7817,13 @@ function dol_htmlentitiesbr($stringtoencode, $nl2brmode = 0, $pagecodefrom = 'UT
if ($removelasteolbr) {
$newstring = preg_replace('/<br>$/i', '', $newstring); // Remove last <br> (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__'=>'"'));
Expand Down

0 comments on commit e1e0595

Please sign in to comment.