html.entities --- HTML 一般实体的定义¶

��: Lib/html/entities.py


该模�定义了四个�典, html5� name2codepoint� codepoint2name�以� entitydefs。

html.entities.html5¶

将 HTML5 命�字符引用 [1] 映射到等效的 Unicode 字符的字典,例如 html5['gt;'] == '>'。 请注�,尾�的分�包�在�称中(例如 'gt;' ),但是�使没有分�,一些�称也会被标准接�,在这�情况下,�称出现时带有和�带有 ';'。�� html.unescape()。

在 3.3 版本加入.

html.entities.entitydefs¶

将 XHTML 1.0 实体定义映射到 ISO Latin-1 中的替�文本的字典。

html.entities.name2codepoint¶

一个将 HTML4 实体�称映射到 Unicode 代�点的字典。

html.entities.codepoint2name¶

一个将 Unicode 代�点映射到 HTML4 实体�称的字典。

备注