Class HtmlSanitizerConverter

java.lang.Object
io.goobi.viewer.faces.converters.HtmlSanitizerConverter
All Implemented Interfaces:
Converter<String>

public class HtmlSanitizerConverter extends Object implements Converter<String>

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.