In my form class I am adding a submit button:
$this->add([
'name' => 'submit',
'attributes' => [
'type' => 'submit',
'value' => 'Login ▹',
],
]);
The output is:
<input name="submit" type="submit" value="Login &#9657;">
How do I stop the value from being escaped?
Edit
Based on @RubenButurca answer, here is the output:


It felt odd escaping the value of my submit input. When I tried values such as
<i class="fa fa-caret-right"></i>it, well, didn't escape the quotes and I ended up with random attributes in my input element. As such, I've swapped from an input field to a button.ZendButon requires a label, which I didn't want. So I extended the view helper to take the label value from the element value (
$buttonContent). Because there is nolabelattribute there is no label echoed, but the escaped value is still shown in the button tags.FormButton:
Output: