Pyro

A dynamically-typed, garbage-collected scripting language.

Version 0.17.7

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 text with 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 text with their corresponding character entities.

Escapes the characters <, >, and &.

The returned string can be safely used inside HTML tags.