string/html_sanitizer_utils library
HTML sanitizer: allowlist tags/attributes, strip scripts/styles (roadmap #439).
Functions
-
sanitizeHtml(
String html) → String - Removes script and style tag contents, then strips all HTML tags.
-
stripHtmlTags(
String html) → String - Strips all HTML tags and returns plain text (no attributes or script content).