Documentation
¶
Overview ¶
Package utils provides utility functions including HTML sanitization.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterUnicode ¶
This ensures OTRS compatibility when Unicode support is disabled.
func IsMarkdown ¶
IsMarkdown checks if the content appears to be markdown (common patterns from Tiptap conversion).
func MarkdownToHTML ¶
MarkdownToHTML converts markdown content to HTML.
Types ¶
type HTMLSanitizer ¶
type HTMLSanitizer struct {
// contains filtered or unexported fields
}
HTMLSanitizer provides HTML sanitization for user input.
func NewHTMLSanitizer ¶
func NewHTMLSanitizer() *HTMLSanitizer
NewHTMLSanitizer creates a new HTML sanitizer with GoatFlow-specific policy.
func (*HTMLSanitizer) Sanitize ¶
func (s *HTMLSanitizer) Sanitize(html string) string
Sanitize cleans HTML content to prevent XSS attacks.
Click to show internal directories.
Click to hide internal directories.