Skip to main content

escape_filter

Mark the value as a string that should be auto-escaped.

def escape_filter(
value: string
) - > SafeString

Mark the value as a string that should be auto-escaped.

Parameters

NameTypeDescription
valuestringThe raw string or object representation to be processed for HTML auto-escaping.

Returns

TypeDescription
SafeStringThe escaped string content, marked as safe for HTML output to prevent double-escaping while ensuring special characters are handled.