Package org.codelibs.fess.helper
Class MarkdownRenderer
java.lang.Object
org.codelibs.fess.helper.MarkdownRenderer
Renders markdown to sanitized HTML for safe display in the chat interface.
Uses commonmark for markdown parsing and OWASP HTML Sanitizer for XSS prevention.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinit()Initializes the markdown parser, HTML renderer, and sanitizer.booleanChecks if the renderer is properly initialized.Renders markdown text to sanitized HTML.
-
Constructor Details
-
MarkdownRenderer
public MarkdownRenderer()Default constructor.
-
-
Method Details
-
init
@PostConstruct public void init()Initializes the markdown parser, HTML renderer, and sanitizer. -
render
Renders markdown text to sanitized HTML.- Parameters:
markdown- the markdown text to render- Returns:
- sanitized HTML string
-
isInitialized
public boolean isInitialized()Checks if the renderer is properly initialized.- Returns:
- true if initialized
-