DeAI Research
Source · pydoc

html — HyperText Markup Language support — Python 3.13.18 documentation

2001

cid 81d47e066131f85a3fb32845ea6f521330f9c643136cefbed4c8d4fb85632544 · original · open access · via pydoc

Title: html — HyperText Markup Language support — Python 3.13.18 documentation
Authors: 
Venue: pydoc
Year: 2001
Canonical: pydoc:html@3.13
URL: https://docs.python.org/3.13/library/html.html
Collector: pydoc
OA: true

ABSTRACT
html — HyperText Markup Language support — Python 3.13.18 documentation Navigation index modules | next | previous | Python » 3.13.18 Documentation » The Python standard library » Structured Markup Processing Tools » html — HyperText Markup Language support | Theme Auto Light Dark | html — HyperText Markup Language support¶ Source code: Lib/html/__init__.py This module defines utilities to manipulate HTML. html.escape(s, quote=True)¶ Convert the characters &, in string s to HTML-safe sequences. Use this if you need to display text that might contain such characters in HTML. If the optional flag quote is true (the default), the characters (") and (') are also translated; this helps for inclusion in an HTML attribute value delimited by quotes, as in . If quote is set to false, the characters (") and (') are not translated. Added in version 3.2. html.unescape(s)¶ Convert all named and numeric character references (e.g. , , ) in the string s to the corresponding Unicode characters. This function uses the rules defined by the HTML 5 standard for both valid and invalid character references, and the list of HTML 5 named character references. Added in version 3.4. Submodules in the html package are: html.parser – HTML/XHTML parser with lenient parsing mode html.entities – HTML entity definitions Previous topic Structured Markup Processing Tools Next topic html.parser — Simple HTML and XHTML parser This page Report a bug Show source « Navigation index modules | next | previous | Python » 3.13.18 Documentation » The Python standard library » Structured Markup Processing Tools » html — HyperText Markup Language support | Theme Auto Light Dark | © Copyright 2001-2026, Python Software Foundation. This page is licensed under the Python Software Foundation License Version 2. Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License. See History and License for more information. The Python Software Foundation is a non-profit corporation. Please donate. Last updated on Oct 26, 2026 (13:10 UTC). Found a bug? Created using Sphinx 8.2.3.