summaryrefslogtreecommitdiff
path: root/dev-python/tempita/files/tempita-0.5.3-cgi-escape.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/tempita/files/tempita-0.5.3-cgi-escape.patch')
-rw-r--r--dev-python/tempita/files/tempita-0.5.3-cgi-escape.patch31
1 files changed, 0 insertions, 31 deletions
diff --git a/dev-python/tempita/files/tempita-0.5.3-cgi-escape.patch b/dev-python/tempita/files/tempita-0.5.3-cgi-escape.patch
deleted file mode 100644
index d411d28ced48..000000000000
--- a/dev-python/tempita/files/tempita-0.5.3-cgi-escape.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-diff --git a/tempita/__init__.py b/tempita/__init__.py
-index 137ba2d..acc2fd9 100755
---- a/tempita/__init__.py
-+++ b/tempita/__init__.py
-@@ -31,12 +31,12 @@ can use ``__name='tmpl.html'`` to set the name of the template.
- If there are syntax errors ``TemplateError`` will be raised.
- """
-
--import cgi
- import os
- import re
- import sys
- import tokenize
- from cStringIO import StringIO
-+from html import escape
- from urllib import quote as url_quote
- from tempita._looper import looper
- from tempita.compat3 import bytes, basestring_, next, is_unicode, coerce_text
-@@ -445,10 +445,10 @@ def html_quote(value, force=True):
- if not isinstance(value, basestring_):
- value = coerce_text(value)
- if sys.version >= "3" and isinstance(value, bytes):
-- value = cgi.escape(value.decode('latin1'), 1)
-+ value = escape(value.decode('latin1'), 1)
- value = value.encode('latin1')
- else:
-- value = cgi.escape(value, 1)
-+ value = escape(value, 1)
- if sys.version < "3":
- if is_unicode(value):
- value = value.encode('ascii', 'xmlcharrefreplace')