summarylogtreecommitdiffstats
path: root/cmark-python38.patch
diff options
context:
space:
mode:
authorMichael Hansen2019-12-02 17:12:10 -0800
committerMichael Hansen2019-12-02 17:12:10 -0800
commitdff7c091f0bb4e51165241f50a9d86cba224060b (patch)
tree91a070bcd8cac54d53fc2f5c5ccce65f0cdb4c1d /cmark-python38.patch
parentbc63c34c821f59bccf070000381daa5eab454bd7 (diff)
downloadaur-dff7c091f0bb4e51165241f50a9d86cba224060b.tar.gz
Backport fix for cmark test
Diffstat (limited to 'cmark-python38.patch')
-rw-r--r--cmark-python38.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/cmark-python38.patch b/cmark-python38.patch
new file mode 100644
index 000000000000..d10fec717359
--- /dev/null
+++ b/cmark-python38.patch
@@ -0,0 +1,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"