org.webbitserver.helpers
Class XssCharacterEscaper
java.lang.Object
org.webbitserver.helpers.XssCharacterEscaper
public class XssCharacterEscaper
- extends Object
|
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 |
XssCharacterEscaper
public XssCharacterEscaper()
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 © 2012. All Rights Reserved.