[−][src]Function concatsql::html_special_chars
pub fn html_special_chars(input: &str) -> String
Convert special characters to HTML entities.
Performed translations
Character | Replacement |
---|---|
& | & |
" | " |
' | ' |
< | < |
> | > |
Examples
let encoded = concatsql::html_special_chars("<a href='test'>Test</a>"); assert_eq!(&encoded, "<a href='test'>Test</a>");