Skip to content

Commit

Permalink
normalize.py: use html.escape instead of cgi.escape.
Browse files Browse the repository at this point in the history
jgm authored and drexin committed May 8, 2020
1 parent bfa95d5 commit 319e28c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/normalize.py
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ class HTMLParseError(Exception):
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 @@ def handle_starttag(self, tag, attrs):
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"

0 comments on commit 319e28c

Please sign in to comment.