Skip to main content

escape_xml

Function escape_xml 

Source
pub fn escape_xml(s: &str) -> String
Expand description

Escape XML/HTML special characters for safe interpolation into element text content (between tags). Use when untrusted strings (process stdout, user input, external data) go inside <tag>${here}</tag>.