html library

html library

html library

Function

html standard library is used to process HTML text, providing escaping, anti-escaping, tag stripping and string reading capabilities.

API List

APIDescription
html.escapeEscape HTML special characters.
html.unescapeRestore common HTML entities.
html.stripRemove HTML tags and keep the text outside the tags.
html.to_stringReturns the current HTML raw text.

Examples

Notes

  • HTML capabilities are migrated from the String prototype to the html standard library to facilitate subsequent expansion of parsing, cleaning, and crawler-related capabilities.