title: Symfony2 vulnerability to XSS Attacks
body: <p>I'm using Symfony2 witch Sencha Ext JS as a frontend. </p>
  
  <p>I found that my forms are vulnerable to XSS attacks. 
  I'm aware, of that Symfony2 have mechanisms, that secure our data from this attacks, however this mechanisms are mostly using templates for this which i don't use.</p>
  
  <p>I'm collecting plenty of data from fronted fields, that are passed to backend. I wish to fix this issue with as less effort as possible. </p>
  
  <p>My goal is to secure my application before data gets to database.
  And there is 2 choices that I have on my mind. </p>
  
  <ul>
  <li><p>First is to add strip_tag function on <strong>lifecycle event listeners</strong>, that listen data preFlush. </p></li>
  <li><p>Second is to add strip_tags on <strong>entity level</strong> on selected vulnerable fields. </p></li>
  </ul>
  
  <p>Both choices seems to me not sufficient, because of quantity of code. </p>
  
  <p>Is there maybe a good idea to add some code in Sencha frontend?
  I'm not sure what to do. </p>
  
  <p>Thanks for advices!</p>