The escaping is disabled by the template.
>>>>templates/test.tpl
<?xml version="1.0" ?>
<opt:root escaping="no">
{$htmlVariable}
</opt:root>
>>>>expected.txt
OUTPUT
>>>>result.txt
HTML: <tag>
>>>>data.php
$view->htmlVariable = 'HTML: <tag>';
$this->tpl->escape = true;