pub fn html_escape(s: &str) -> StringExpand description
Escape a string for safe insertion into HTML element content or double-quoted HTML attributes.
Replaces &, <, >, ", ' with their HTML entities.
ยงExample
use rustango::text::html_escape;
assert_eq!(html_escape("<script>"), "<script>");
assert_eq!(html_escape("a & b"), "a & b");