Skip to content

Commit

Permalink
replace cgi.escape with html.escape (#656)
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherfujino authored Jul 12, 2020
1 parent 1103710 commit 92697d5
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
Expand Up @@ -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/
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 92697d5

Please sign in to comment.