Allow html tags in Form submit button in block plugin I'm using a block plugin to render a user specified form. I'm retrieving the form like so:

public function blockSubmit($form, FormStateInterface $form_state) {

    $this-&gt;configuration['template'] = $form_state-&gt;getValue('template');
    $selected_entity_type_bundle     = $form_state-&gt;getValue('entity_type');
    $values                          = explode('.', $selected_entity_type_bundle);

    $this-&gt;configuration['entity_type']             = $values[0];
    $this-&gt;configuration['bundle']                  = $values[1];
    $this-&gt;configuration['entity_type_submit_text'] = $form_state-&gt;getValue('entity_type_submit_text');

}

private function buildEntityForm() {
    $values = array();
    // Specify selected bundle if the entity has bundles.
    if (\Drupal::entityManager()-&gt;getDefinition($this-&gt;configuration['entity_type'])-&gt;hasKey('bundle')) {
        $bundle_key = \Drupal::entityManager()-&gt;getDefinition($this-&gt;configuration['entity_type'])-&gt;getKey('bundle');
        $values     = array($bundle_key =&gt; $this-&gt;configuration['bundle']);
    }
    $entity = \Drupal::entityManager()
        -&gt;getStorage($this-&gt;configuration['entity_type'])
        -&gt;create($values);

    if ($entity instanceof EntityOwnerInterface) {
        $entity-&gt;setOwnerId(\Drupal::currentUser()-&gt;id());
    }

    $form = \Drupal::entityManager()
        -&gt;getFormObject($this-&gt;configuration['entity_type'], 'default')
        -&gt;setEntity($entity);

    return \Drupal::formBuilder()-&gt;getForm($form);
}


This grabs the form just fine, and I render it using 

public function build() {

    if ($this-&gt;configuration['entity_type'] != '') {
        $entityForm                                = $this-&gt;buildEntityForm();
        $entityForm['actions']['submit']['#value'] = t($this-&gt;configuration['entity_type_submit_text']);// Editable submit button value.
        if ($this-&gt;configuration['template'] == 'learnmore') {
            $entityForm['actions']['submit']['#value'] = '&lt;i class="fa fa-mail"&gt;&lt;/i&gt;'.$entityForm['actions']['submit']['#value'];
        }
    } else {
        $entityForm = '';
    }
    $entityForm['actions']['preview'] = '';

    $content = [
        'template'     =&gt; [
            '#type'       =&gt; 'container',
            '#attributes' =&gt; [
                'class'      =&gt; [$this-&gt;configuration['template']],
            ],
            'header'  =&gt; [
                '#type'  =&gt; 'html_tag',
                '#tag'   =&gt; 'h5',
                '#value' =&gt; $this-&gt;configuration['label'],
            ],
            'form' =&gt; $entityForm,
        ],
    ];

    return $content;
}


Which renders the form. But I'm setting the submit button text as specified by the user like so

$entityForm['actions']['submit']['#value'] = t($this-&gt;configuration['entity_type_submit_text']);


And I want to add an icon inside the button before the text like so  

$entityForm['actions']['submit']['#value'] = '&lt;i class="fa fa-mail"&gt;&lt;/i&gt;'.$entityForm['actions']['submit']['#value'];


The issue is when it renders the button it includes the html tags so the actual submit button text is


  &lt;i class="fa fa-mail"&gt;&lt;/i&gt;Submit Button Text


It displays the html tags instead of rendering the actual icon. 
Is there a way to allow html tags inside of a submit button on a form?
Use a formattable markup:

use Drupal\Component\Render\FormattableMarkup;

  $value = new FormattableMarkup('&lt;i class="fa fa-mail"&gt;&lt;/i&gt;@text', [
    '@text' =&gt; $value,
  ]);


The formattable string will not be escaped. The variable in the placeholder @text will be escaped and that is important, because it contains user input.