Package io.goobi.viewer.faces.converters
Class HtmlSanitizerConverter
java.lang.Object
io.goobi.viewer.faces.converters.HtmlSanitizerConverter
JSF converter that runs HtmlSanitizer.cleanRichText(String) on a submitted
input value before it reaches the model. Intended for <h:inputTextarea>
elements bound to TinyMCE-style rich-text editors, so persisted CMS content cannot
carry stored XSS payloads.
getAsString(FacesContext, UIComponent, String) returns the value unchanged
because the editor's display value should not be re-sanitized on every render — that
is the render-side HtmlSanitizerBean's job, applied at the read sink.
-
Field Summary
Fields inherited from interface jakarta.faces.convert.Converter
DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE_PARAM_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAsObject(FacesContext context, UIComponent component, String value) getAsString(FacesContext context, UIComponent component, String value)
-
Constructor Details
-
HtmlSanitizerConverter
public HtmlSanitizerConverter()
-
-
Method Details
-
getAsObject
- Specified by:
getAsObjectin interfaceConverter<String>
-
getAsString
- Specified by:
getAsStringin interfaceConverter<String>
-