You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.0 KiB

  1. :mod:`html.entities` --- Definitions of HTML general entities
  2. =============================================================
  3. .. module:: html.entities
  4. :synopsis: Definitions of HTML general entities.
  5. .. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
  6. **Source code:** :source:`Lib/html/entities.py`
  7. --------------
  8. This module defines three dictionaries, ``name2codepoint``, ``codepoint2name``,
  9. and ``entitydefs``. ``entitydefs`` is used to provide the :attr:`entitydefs`
  10. attribute of the :class:`html.parser.HTMLParser` class. The definition provided
  11. here contains all the entities defined by XHTML 1.0 that can be handled using
  12. simple textual substitution in the Latin-1 character set (ISO-8859-1).
  13. .. data:: entitydefs
  14. A dictionary mapping XHTML 1.0 entity definitions to their replacement text in
  15. ISO Latin-1.
  16. .. data:: name2codepoint
  17. A dictionary that maps HTML entity names to the Unicode codepoints.
  18. .. data:: codepoint2name
  19. A dictionary that maps Unicode codepoints to HTML entity names.