Render raw html in checkbox label

[MAILPOET-2803]
This commit is contained in:
Pavel Dohnal
2020-04-30 13:03:40 +02:00
committed by Veljko V
parent 17545f1b79
commit 71106cc90e
3 changed files with 6 additions and 15 deletions

View File

@@ -3,7 +3,6 @@
namespace MailPoet\Form\Block;
use MailPoet\Form\BlockWrapperRenderer;
use MailPoet\WP\Functions as WPFunctions;
class Checkbox {
@@ -13,13 +12,9 @@ class Checkbox {
/** @var BlockWrapperRenderer */
private $wrapper;
/** @var WPFunctions */
private $wp;
public function __construct(BlockRendererHelper $rendererHelper, BlockWrapperRenderer $wrapper, WPFunctions $wp) {
public function __construct(BlockRendererHelper $rendererHelper, BlockWrapperRenderer $wrapper) {
$this->rendererHelper = $rendererHelper;
$this->wrapper = $wrapper;
$this->wp = $wp;
}
public function render(array $block, array $formSettings): string {
@@ -56,7 +51,7 @@ class Checkbox {
$html .= $fieldValidation;
$html .= ' /> ' . $this->wp->escAttr($option['value']);
$html .= ' /> ' . $option['value'];
$html .= '</label>';
}