pub fn strip_tags(html: &str) -> StringExpand description
Removes every tag and comment and keeps the text, escaped (Rails’ strip_tags).
<script> and <style> content is removed too. The result is HTML
(< stays escaped): insert it with |safe, or decode it for plain
text.
§Examples
use ocre::security::strip_tags;
assert_eq!(strip_tags("<p>Hello <b>world</b>!</p><!-- note -->"), "Hello world!");
assert_eq!(strip_tags("<script>alert(1)</script>a < b"), "a < b");