title: php Symfony2 alternative filter for raw
body: <p>Hi I am developing app with symfony2. and for quality control used the sensio lab insight.
  but the error im getting puts me dumbstruck. this is the error im getting:</p>
  
  <p>Using the |raw filter or the {% autoescape false %} block in a Twig template exposes users to Cross-Site Scripting (XSS) attacks</p>
  
  <p>my question is what filter can i use instead of raw?</p>
  
  <pre><code>{% if (value is not iterable and value matches '/^(function|\{)/i') %}{{ value|raw }}{% else %}{{ value|json_encode|raw }}{% endif %};
  </code></pre>
  
  <p>thanks</p>