Skip to main content

sanitize_summary_text

Function sanitize_summary_text 

Source
pub fn sanitize_summary_text(text: &str) -> String
Expand description

Neutralize wrapper/escaping injection inside summary text (spec §9.3: escaping cannot elevate content). Any opening or closing form of a protected tag has its < replaced with the HTML entity, which keeps the text legible while breaking the markup.