Conserver les tags html dans les libellés

This commit is contained in:
Jean-Christophe Engel 2026-07-02 18:46:26 +02:00
parent 3d966e4bf6
commit 061fb13e5d

View file

@ -9,7 +9,10 @@ f(['id' => 'required|numeric']);
$id = (int) qg('id');
$sign_tag = UserTemplate\Functions::signature();
$h = static function ($value): string {
return htmlspecialchars((string) $value, ENT_QUOTES, 'UTF-8');
return htmlspecialchars_decode(
htmlentities($value, ENT_NOQUOTES, 'UTF-8', false),
ENT_NOQUOTES
);
};
$br = static function ($value) use ($h): string {
return nl2br($h($value));