title: How to sanitize HTML Input values before rendering on client side where we can filter allowed tags
body: <p>I am trying to sanitize my application from XSS attacks.
  I am doing both at the server side and at the client side , 
  My requirement is to allow some of the tags(like <code>&lt;div&gt;</code> etc). but for client side, I am not able to find a library which has this method/property of filtering the tags. Any suggestion would be helpful</p>