Security API¶
markSafe¶
Mark a string as safe (bypass auto-escaping).
isSafe¶
Check if a value is marked safe.
escapeHtml¶
Escape HTML special characters (&, <, >, ", ', `).
Force-Escape SafeString¶
Pass true as the second argument to force-escape a SafeString (matching Django's |escape filter behavior):
stripExpressContext¶
Strip Express-specific framework keys (_, settings, cache) from a context object.
SafeString Class¶
Create a SafeString instance directly.
Path Traversal Protection¶
The extends and include tags validate that resolved template paths stay within configured views directories. Attempting to traverse outside throws an error: