- Commit
- 68c3a91166347a32a57fb81223750a63cfd92105
- Parent
- 7b35d4bdc5e514ded03c0f0012983fe315a3aaf4
- Author
- John MacFarlane <jgm@berkeley.edu>
- Date
normalize.py: use html.escape instead of cgi.escape.
Closes #313.
My personal build of CMark ✏️
normalize.py: use html.escape instead of cgi.escape.
Closes #313.
1 file changed, 2 insertions, 2 deletions
Status | File Name | N° Changes | Insertions | Deletions |
Modified | test/normalize.py | 4 | 2 | 2 |
diff --git a/test/normalize.py b/test/normalize.py @@ -13,7 +13,7 @@ except ImportError: from html.entities import name2codepoint import sys import re -import cgi +import html # Normalization code, adapted from # https://github.com/karlcow/markdown-testsuite/ @@ -66,7 +66,7 @@ class MyHTMLParser(HTMLParser): self.output += ("=" + '"' + urllib.quote(urllib.unquote(v), safe='/') + '"') elif v != None: - self.output += ("=" + '"' + cgi.escape(v,quote=True) + '"') + self.output += ("=" + '"' + html.escape(v,quote=True) + '"') self.output += ">" self.last_tag = tag self.last = "starttag"