Improve legend tag rendering in forms

The legend html was not escaped and was ignoring block settings coming
from the form editor.
This commit adds a new helper function for rendering legend that respects
applies block settings and also escapes the output.
[MAILPOET-4471]
This commit is contained in:
Rostislav Wolny
2022-07-19 10:38:07 +02:00
committed by Veljko V
parent 243e1bdac8
commit 7f525068b3
5 changed files with 53 additions and 4 deletions

View File

@@ -33,7 +33,7 @@ class Checkbox {
$fieldValidation = $this->rendererHelper->getInputValidation($block, [], $formId);
$html .= '<fieldset>';
$html .= '<legend>' . $block['params']['label'] . '</legend>';
$html .= $this->rendererHelper->renderLegend($block, $formSettings);
$options = (!empty($block['params']['values'])
? $block['params']['values']