public class SanitizingConverter
extends java.lang.Object
implements javax.faces.convert.Converter<java.lang.Object>, java.io.Serializable
Converter which sanitizes any input using an OWASP Java HTML Sanitizer PolicyFactory. Useful for cleansing input if going to be displayed in
outputText with escape="false".| Constructor and Description |
|---|
SanitizingConverter() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getAsObject(javax.faces.context.FacesContext fc,
javax.faces.component.UIComponent uic,
java.lang.String value) |
java.lang.String |
getAsString(javax.faces.context.FacesContext fc,
javax.faces.component.UIComponent uic,
java.lang.Object o) |
org.owasp.html.PolicyFactory |
getPolicy() |
boolean |
isDecodeHtml() |
java.lang.String |
sanitize(java.lang.String value)
Method to facilitate "mis-using" this class to sanitize data coming over the network
|
void |
setDecodeHtml(boolean decodeHtml) |
void |
setPolicy(org.owasp.html.PolicyFactory policy) |
public java.lang.String sanitize(java.lang.String value)
value - the value to sanitizepublic java.lang.Object getAsObject(javax.faces.context.FacesContext fc,
javax.faces.component.UIComponent uic,
java.lang.String value)
getAsObject in interface javax.faces.convert.Converter<java.lang.Object>public java.lang.String getAsString(javax.faces.context.FacesContext fc,
javax.faces.component.UIComponent uic,
java.lang.Object o)
getAsString in interface javax.faces.convert.Converter<java.lang.Object>public org.owasp.html.PolicyFactory getPolicy()
public void setPolicy(org.owasp.html.PolicyFactory policy)
public boolean isDecodeHtml()
public void setDecodeHtml(boolean decodeHtml)
Copyright © 2011–2021. All rights reserved.