Class XSSUtils
java.lang.Object
org.apache.sling.testing.clients.util.XSSUtils
Basic class for XSS Testing
The reliability of these methods are not critical
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringencodeForHTML(String source) Use to encapsulate new-style (XSSAPI-based) encoding for HTML element content.static StringencodeForHTMLAttr(String source) Use to encapsulate new-style (XSSAPI-based) encoding for HTML attribute values.static StringencodeForJSString(String source) Use to encapsulate new-style (XSSAPI-based) encoding for JavaScript strings.static StringencodeForXML(String source) Use to encapsulate new-style (XSSAPI-based) encoding for XML element content.static StringencodeForXMLAttr(String source) Use to encapsulate new-style (XSSAPI-based) encoding for XML attribute values.static StringUse to ensure that HTTP query strings are in proper form, by escaping special characters such as spaces.static StringescapeHtml(String htmlString) Use to encapsulate old-style escaping of HTML (using StringEscapeUtils).static StringUse to encapsulate old-style escaping of XML (with JSTL encoding rules).
-
Constructor Details
-
XSSUtils
public XSSUtils()
-
-
Method Details
-
encodeUrl
-
escapeHtml
-
escapeXml
-
encodeForHTML
-
encodeForHTMLAttr
-
encodeForXML
-
encodeForXMLAttr
-
encodeForJSString
-