title: AntiSamy to prevent XSS in java?
body: <p>Basically I have a web-app which it currently is vulnerable to XSS. Based on my research I found one of good and open library that can help would be AntiSamy. So I downloaded the library .jar file which is <code>antisamy-1.5.1.jar</code> and The policy file <code>antisamy-slashdot-1.4.4.xml</code> and exported it to my project WEB-INF directory.</p>
  
  <p>I'm pretty much new to AntiSamy and don't really know how to implement it on a string to encode and secure it from XSS.</p>
  
  <p>Say I've a string of: <code>String XSSPossible = "&lt;script&gt;alert("It's vulnerable.");&lt;/script&gt;";</code> Now I want to encode this to a normal text and secure it from XSS.</p>
  
  <p>Much Regards.</p>