Expand description
HTML and inline-script escaping helpers.
These helpers are intentionally small and dependency-free. They are meant for server-side placeholder injection into already generated HTML, not for sanitizing untrusted rich HTML.
Functionsยง
- escape_
html - Escapes text for HTML text or attribute placeholder insertion.
- escape_
script_ json - Escapes a JSON string fragment before embedding it in an inline
<script>context.