--TEST-- "autoescape" tag accepts an escaping strategy --TEMPLATE-- {% autoescape 'js' %}{{ var }}{% endautoescape %} {% autoescape 'html' %}{{ var }}{% endautoescape %} --DATA-- return array('var' => '<br />"') --EXPECT-- \x3Cbr\x20\x2F\x3E\x22 <br />"
info at phpclasses dot org