summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/src/Lib/html
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/tools/python3/src/Lib/html')
-rw-r--r--contrib/tools/python3/src/Lib/html/entities.py9
-rw-r--r--contrib/tools/python3/src/Lib/html/parser.py3
2 files changed, 8 insertions, 4 deletions
diff --git a/contrib/tools/python3/src/Lib/html/entities.py b/contrib/tools/python3/src/Lib/html/entities.py
index dc508631ac4..eb6dc121905 100644
--- a/contrib/tools/python3/src/Lib/html/entities.py
+++ b/contrib/tools/python3/src/Lib/html/entities.py
@@ -3,8 +3,7 @@
__all__ = ['html5', 'name2codepoint', 'codepoint2name', 'entitydefs']
-# maps the HTML entity name to the Unicode code point
-# from https://html.spec.whatwg.org/multipage/named-characters.html
+# maps HTML4 entity name to the Unicode code point
name2codepoint = {
'AElig': 0x00c6, # latin capital letter AE = latin capital ligature AE, U+00C6 ISOlat1
'Aacute': 0x00c1, # latin capital letter A with acute, U+00C1 ISOlat1
@@ -261,7 +260,11 @@ name2codepoint = {
}
-# maps the HTML5 named character references to the equivalent Unicode character(s)
+# HTML5 named character references
+# Generated by Tools/build/parse_html5_entities.py
+# from https://html.spec.whatwg.org/entities.json and
+# https://html.spec.whatwg.org/multipage/named-characters.html.
+# Map HTML5 named character references to the equivalent Unicode character(s).
html5 = {
'Aacute': '\xc1',
'aacute': '\xe1',
diff --git a/contrib/tools/python3/src/Lib/html/parser.py b/contrib/tools/python3/src/Lib/html/parser.py
index bef0f4fe4bf..13c95c34e50 100644
--- a/contrib/tools/python3/src/Lib/html/parser.py
+++ b/contrib/tools/python3/src/Lib/html/parser.py
@@ -89,6 +89,7 @@ class HTMLParser(_markupbase.ParserBase):
If convert_charrefs is True (the default), all character references
are automatically converted to the corresponding Unicode characters.
"""
+ super().__init__()
self.convert_charrefs = convert_charrefs
self.reset()
@@ -98,7 +99,7 @@ class HTMLParser(_markupbase.ParserBase):
self.lasttag = '???'
self.interesting = interesting_normal
self.cdata_elem = None
- _markupbase.ParserBase.reset(self)
+ super().reset()
def feed(self, data):
r"""Feed data to the parser.