HTML text like Python: escape/1 of markupsafe, unescape/1 of html.unescape, and striptags/1 of Markup.striptags.
The character references come from priv/html_entities.json, which scripts/generate_html_entities.py writes from the HTML5 table of Python.
Summary
Functions
Escapes &, <, >, ' and ", like markupsafe.escape.
Removes the tags and comments of text, joins the whitespace into single spaces, and unescapes the references, like Markup.striptags of markupsafe.
Replaces the named and numeric character references, like html.unescape.
Functions
Escapes &, <, >, ' and ", like markupsafe.escape.
Removes the tags and comments of text, joins the whitespace into single spaces, and unescapes the references, like Markup.striptags of markupsafe.
Replaces the named and numeric character references, like html.unescape.