Skip to main content

escape

Function escape 

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

Encode the five characters that let a value stop being a value.

Sound in element text and in a double-quoted attribute alike, which is the property textContent-based escaping cannot have. Both sinks are covered by one function so that no call site has to choose, here or downstream.