Fix regression

This commit is contained in:
Laurent Destailleur
2022-11-28 19:05:51 +01:00
parent 5cfe40a4bc
commit dc0d9e1b94

View File

@@ -908,7 +908,7 @@ function sanitizeVal($out = '', $check = 'alphanohtml', $filter = null, $options
break; break;
case 'restricthtml': // Recommended for most html textarea case 'restricthtml': // Recommended for most html textarea
case 'restricthtmlallowunvalid': case 'restricthtmlallowunvalid':
$out = dol_htmlwithnojs($out, 1); $out = dol_htmlwithnojs($out, 1, $check);
break; break;
case 'custom': case 'custom':
if (!empty($out)) { if (!empty($out)) {
@@ -7098,9 +7098,10 @@ function dol_nl2br($stringtoencode, $nl2brmode = 0, $forxml = false)
* *
* @param string $stringtoencode String to encode * @param string $stringtoencode String to encode
* @param int $nouseofiframesandbox Allow use of option MAIN_SECURITY_USE_SANDBOX_FOR_HTMLWITHNOJS for html sanitizing * @param int $nouseofiframesandbox Allow use of option MAIN_SECURITY_USE_SANDBOX_FOR_HTMLWITHNOJS for html sanitizing
* @param string $check 'restricthtml' or 'restricthtmlallowunvalid'
* @return string HTML sanitized * @return string HTML sanitized
*/ */
function dol_htmlwithnojs($stringtoencode, $nouseofiframesandbox = 0) function dol_htmlwithnojs($stringtoencode, $nouseofiframesandbox = 0, $check = 'restricthtml')
{ {
global $conf; global $conf;