Skip to content
Permalink
Browse files

normalize.py: use html.escape instead of cgi.escape.

Closes #313.
  • Loading branch information
jgm committed Nov 28, 2019
1 parent 7b35d4b commit 68c3a91166347a32a57fb81223750a63cfd92105
Showing with 2 additions and 2 deletions.
  1. +2 −2 test/normalize.py
@@ -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 68c3a91

Please sign in to comment.
You can’t perform that action at this time.