org.webbitserver.helpers
Class XssCharacterEscaper

java.lang.Object
  extended by org.webbitserver.helpers.XssCharacterEscaper

public class XssCharacterEscaper
extends Object


Constructor Summary
XssCharacterEscaper()
           
 
Method Summary
static String escape(String input)
          Replaces characters in input which may open up cross-site scripting (XSS) attacks with XSS-safe equivalents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XssCharacterEscaper

public XssCharacterEscaper()
Method Detail

escape

public static String escape(String input)
Replaces characters in input which may open up cross-site scripting (XSS) attacks with XSS-safe equivalents. Follows escaping rules from the OWASP.

Parameters:
input - String to sanitize.
Returns:
XSS-safe version of input.


Copyright © 2013. All Rights Reserved.