Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into 22.0

This commit is contained in:
ldestailleur
2025-08-21 15:40:32 +02:00

View File

@@ -2160,9 +2160,9 @@ function dolPrintText($s)
* To output a text inside an attribute, you can use dolPrintHTMLForAttribute() or dolPrintHTMLForTextArea() inside a textarea
* With dolPrintHTML(), only content not already in HTML is encoded with HTML.
*
* @param string $s String to print
* @param int $allowiframe Allow iframe tags
* @return string String ready for HTML output (sanitized and escape)
* @param int|float|string $s String to print
* @param int $allowiframe Allow iframe tags
* @return string String ready for HTML output (sanitized and escape)
* @see dolPrintHTMLForAttribute(), dolPrintHTMLFortextArea(), dolPrintText()
*/
function dolPrintHTML($s, $allowiframe = 0)
@@ -2172,7 +2172,7 @@ function dolPrintHTML($s, $allowiframe = 0)
// dol_htmlentitiesbr encode all chars except "'" if string is not already HTML, but
// encode only special char like é but not &, <, >, ", ' if already HTML.
$stringWithEntitesForSpecialChar = dol_htmlentitiesbr($s);
$stringWithEntitesForSpecialChar = dol_htmlentitiesbr((string) $s);
return dol_escape_htmltag(dol_htmlwithnojs(dol_string_onlythesehtmltags($stringWithEntitesForSpecialChar, 1, 1, 1, $allowiframe)), 1, 1, 'common', 0, 1);
}