Package org.exoplatform.commons.utils
Class HTMLSanitizer
- java.lang.Object
-
- org.exoplatform.commons.utils.HTMLSanitizer
-
public abstract class HTMLSanitizer extends Object
Prevent XSS/XEE attacks by encoding user HTML inputs. This class will be used to encode data in in presentation layer.- Version:
- $Revision$
- Author:
- Khemais MENZLI
-
-
Field Summary
Fields Modifier and Type Field Description static com.google.common.base.Function<org.owasp.html.HtmlStreamEventReceiver,org.owasp.html.HtmlSanitizer.Policy>POLICY_DEFINITIONA policy definition that matches the minimal HTML that eXo allows.
-
Constructor Summary
Constructors Constructor Description HTMLSanitizer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringsanitize(String html)This service reads HTML from input forms and writes sanitized content to a StringBuffer
-