title: symfony2 twig whitelist html tags
body: <p>I pass a variable to my twig template in Symfony2, this variable may contain <code>&lt;br /&gt;</code> html tags, I have tried to create an extension (function), but the variable still gets escaped.</p>
  
  <p>How can I output a twig variable that allows the <code>&lt;br /&gt;</code> tag? Is there a simple solution to just allow a whitelist of allowed tags in certain templates?</p>
  
  <p>I've searched about twig sandboxes, but I'm not sure if that is my solution.</p>
  
  <p><strong>edit:</strong> I still want the variable to be escaped, but to allow exclusively the <code>&lt;br /&gt;</code> tag.</p>