HTML in table cell being escaped I'm programmatically creating a table in Drupal 8, using #type => 'table'. I'm adding some HTML to a table cell, however the output is being escaped so that the HTML is rendered as plain text, rather than as HTML.

From everything I read, it sounds like all output in twig templates are escaped by default. 

I'm guessing I can override table.html.twig, but I'm guessing (hoping) there is a way to do it when defining the table, rather than overriding the template each time I want to create a new table that has HTML.

Does anyone know how to use HTML in a table cell in D8?
The answer (that worked for me) is to use FormattableMarkup:

use Drupal\Component\Render\FormattableMarkup;

$row[] = new FormattableMarkup('&lt;span&gt;@somevalue&lt;/span&gt;', ['@somevalue' =&gt; 'some value']);