std::html
This module contains utility functions for working with HTML.
Functions
-
esc_attr(text: str) -> str -
Returns the new string formed by replacing HTML syntax characters in
textwith their corresponding character entities.Escapes the characters
<,>,&,", and'.The returned string can be safely used inside HTML attributes.
-
esc_html(text: str) -> str -
Returns the new string formed by replacing HTML syntax characters in
textwith their corresponding character entities.Escapes the characters
<,>, and&.The returned string can be safely used inside HTML tags.