summarylogtreecommitdiffstats
path: root/cmark-python38.patch
blob: d10fec71735905d556fc430aeb8ae789914d2f4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From 68c3a91166347a32a57fb81223750a63cfd92105 Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Wed, 27 Nov 2019 22:04:16 -0800
Subject: [PATCH] normalize.py: use html.escape instead of cgi.escape.

Closes #313.
---
 test/normalize.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/normalize.py b/test/normalize.py
index 6073bf01..f8ece18d 100644
--- a/test/normalize.py
+++ b/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"