[][src]Crate v_htmlescape

Quick start

extern crate v_htmlescape;
use v_htmlescape::escape;

print!("{}", escape("foo<bar"));

https://html.spec.whatwg.org/#serialising-html-fragments Escaping a string (for the purposes of the algorithm above) consists of running the following steps:

Replace any occurrence of the "&" character by the string "&".

Replace any occurrences of the U+00A0 NO-BREAK SPACE character by the string " ".

If the algorithm was invoked in the attribute mode, replace any occurrences of the """ character by the string """.

If the algorithm was not invoked in the attribute mode, replace any occurrences of the "<" character by the string "<", and any occurrences of the ">" character by the string ">".

Modules

fallback

Without simd optimizations

Structs

HTMLEscape

Functions

_v_escape
escape
escape_char
v_escape
v_escape_char