encoding.html #
fn escape #
fn escape(input string, config EscapeConfig) string
escape converts special characters in the input, specifically "<", ">", and "&" to HTML-safe sequences. If quote
is set to true (which is default), quotes in
HTML will also be translated. Both double and single quotes will be affected.
Note: escape() supports funky accents by doing nothing about them. V's UTF-8
support through string
is robust enough to deal with these cases.
struct EscapeConfig #
struct EscapeConfig {
quote bool = true
}