Skip to main content

clean_html

Function clean_html 

Source
pub fn clean_html(html: &str) -> String
Expand description

Clean HTML by removing unwanted tags and their content

Uses the scraper crate for robust HTML5 parsing, which handles malformed HTML better than manual parsing.

This function performs a single-pass HTML parsing and removal of all unwanted elements to minimize parsing overhead.