1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-24 18:41:52 +02:00

[ticket/16690] Fix html functions default flag in convertor

PHPBB3-16690
This commit is contained in:
rxu
2021-01-20 23:26:29 +07:00
parent 2fd4dbb685
commit 513e62f61d

View File

@@ -1468,6 +1468,12 @@ class convertor
$value = array($value);
}
// Add ENT_COMPAT default flag to html specialchars/entities functions, see PHPBB3-16690
if (in_array($execution, ['htmlspecialchars', 'htmlentities', 'htmlspecialchars_decode', 'html_entitity_decode']))
{
$value[] = ENT_COMPAT;
}
$value = call_user_func_array($execution, $value);
}
else if (strpos($type, 'execute') === 0)
@@ -1517,6 +1523,12 @@ class convertor
$value = array($value);
}
// Add ENT_COMPAT default flag to html specialchars/entities functions, see PHPBB3-16690
if (in_array($execution, ['htmlspecialchars', 'htmlentities', 'htmlspecialchars_decode', 'html_entitity_decode']))
{
$value[] = ENT_COMPAT;
}
$value = call_user_func_array($execution, $value);
}
else if (strpos($type, 'execute') === 0)