From 54c8067fb8cae2796c372a5b81634affb4b2cfc1dfe8b91b01b83e3461a5fe0d Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 16 Feb 2022 23:13:15 +0000 Subject: [PATCH] - update to 2.0.2: * Fix escape_url - drop 295-overagreesive-escape_url.patch (upstream) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mistune?expand=0&rev=38 --- 295-overagreesive-escape_url.patch | 34 ------------------------------ mistune-2.0.1.tar.gz | 3 --- mistune-2.0.2.tar.gz | 3 +++ python-mistune.changes | 7 ++++++ python-mistune.spec | 5 +---- 5 files changed, 11 insertions(+), 41 deletions(-) delete mode 100644 295-overagreesive-escape_url.patch delete mode 100644 mistune-2.0.1.tar.gz create mode 100644 mistune-2.0.2.tar.gz diff --git a/295-overagreesive-escape_url.patch b/295-overagreesive-escape_url.patch deleted file mode 100644 index 0518064..0000000 --- a/295-overagreesive-escape_url.patch +++ /dev/null @@ -1,34 +0,0 @@ -From fc2cd53d7698e432ab5b250ffac53458263a49e2 Mon Sep 17 00:00:00 2001 -From: Jeff Dairiki -Date: Thu, 6 Jan 2022 09:30:32 -0800 -Subject: [PATCH] Make mistune.util.escape_url less aggressive -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This adds ';', '!', and '$' to the set of characters which will be -passed unmolested by escape_url. These are all in RFC 3986 reserved -character list — that is to say: escaping these may change the meaning -of a URL. ---- - mistune/util.py | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/mistune/util.py b/mistune/util.py -index 192f6ef..f99fe37 100644 ---- a/mistune/util.py -+++ b/mistune/util.py -@@ -20,7 +20,12 @@ def escape(s, quote=True): - - - def escape_url(link): -- safe = '/#:()*?=%@+,&' -+ safe = ( -+ ':/?#@' # gen-delims - '[]' (rfc3986) -+ '!$&()*+,;=' # sub-delims - "'" (rfc3986) -+ '%' # leave already-encoded octets alone -+ ) -+ - if html is None: - return quote(link.encode('utf-8'), safe=safe) - return html.escape(quote(html.unescape(link), safe=safe)) diff --git a/mistune-2.0.1.tar.gz b/mistune-2.0.1.tar.gz deleted file mode 100644 index 86a5502..0000000 --- a/mistune-2.0.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:73cbdae3539c9dd7deb9c8a2b1bc356fce4bdcb2a25ff02696d831149e28b0e8 -size 83015 diff --git a/mistune-2.0.2.tar.gz b/mistune-2.0.2.tar.gz new file mode 100644 index 0000000..95d5575 --- /dev/null +++ b/mistune-2.0.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9fe296816aee48e65e69abc21608c2b6ba7026fab7baf6232f8f4e92f98986ba +size 83112 diff --git a/python-mistune.changes b/python-mistune.changes index b62fa43..1af13d9 100644 --- a/python-mistune.changes +++ b/python-mistune.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Feb 16 23:12:46 UTC 2022 - Dirk Müller + +- update to 2.0.2: + * Fix escape_url +- drop 295-overagreesive-escape_url.patch (upstream) + ------------------------------------------------------------------- Thu Jan 6 19:50:25 UTC 2022 - Matej Cepl diff --git a/python-mistune.spec b/python-mistune.spec index 2d61c19..e99087b 100644 --- a/python-mistune.spec +++ b/python-mistune.spec @@ -20,16 +20,13 @@ %define modname mistune %define skip_python2 1 Name: python-%{modname} -Version: 2.0.1 +Version: 2.0.2 Release: 0 Summary: Python Markdown parser with renderers and plugins License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/lepture/mistune Source: https://github.com/lepture/%{modname}/archive/refs/tags/v%{version}.tar.gz#/%{modname}-%{version}.tar.gz -# PATCH-FIX-UPSTREAM 295-overagreesive-escape_url.patch gh#lepture/mistune#295 mcepl@suse.com -# Make mistune.util.escape_url less aggressive -Patch0: 295-overagreesive-escape_url.patch BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools}