mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 17:18:13 +01:00
Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into 22.0
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user