html.entities
源代码: Lib/html/entities.py
本模块定义了四个词典, html5
, name2codepoint
, codepoint2name
和 entitydefs
.
- html.entities.html5
映射HTML5命名字符引用的字典 1 等效的Unicode字符,例如
html5['gt;'] == '>'
.注意,后面的分号包含在名称中(例如'gt;'
但是,有些名称即使不带分号,也会被标准接受:在这种情况下,名称带有或不带分号。';'
. 也见html.unescape()
.3.3 新版功能.
脚注
- 1
参见https://www.w3.org/tr/html5/syntax.html命名字符引用