remove_html
Remove selected HTML elements and their contents.
Syntax
{{ value | remove_html:"script" }}{{ value | remove_html:("script", ".ad") }}Example
Basic usage
1{2 "html": "<p>Keep</p><script>remove()</script>"3}1{{ html | remove_html:"script" }}1<p>Keep</p>Behavior
- Unlike remove_tags, this removes the matched element and everything inside it.
- Requires browser-compatible DOM globals and the knap/html preset.