Skip to main content

Module html

Module html 

Source
Expand description

Escape-by-default single-buffer HTML rendering engine with compile-time strict-CSP attribute guarantees (zero inline style="..." or on*="..." constructors).

Structs§

HtmlBuf
Single-buffer HTML writer avoiding intermediate format!() heap allocations.
SanitizedHtml
Audited dynamic HTML produced exclusively by internal sanitizing renderers (e.g. syntax highlighter or sanitized Markdown converter).
TrustedHtml
Audited compile-time static HTML fragment (e.g. inline SVG icon literals).

Enums§

Attr
Typed HTML attributes enforcing strict CSP by omitting style and on* constructors.

Traits§

Render
Composable UI rendering trait. Dynamic text implementations ALWAYS escape HTML.

Functions§

url_encode_component
Percent-encode a single URL path segment or query value (RFC 3986 unreserved set).
write_html_escaped
Append input to out with strict HTML entity escaping (&, <, >, ", ').