diff --git a/python-Django.changes b/python-Django.changes index 2e15fe1..639fb27 100644 --- a/python-Django.changes +++ b/python-Django.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Feb 4 13:21:44 UTC 2026 - Markéta Machová + +- Add test_strip_tags_incomplete.patch to fix behaviour with changes + in the Python interpreter +- Rebase test_strip_tags.patch + ------------------------------------------------------------------- Wed Feb 4 11:00:19 UTC 2026 - Markéta Machová diff --git a/python-Django.spec b/python-Django.spec index c26bfe9..248939a 100644 --- a/python-Django.spec +++ b/python-Django.spec @@ -30,8 +30,11 @@ Source: https://www.djangoproject.com/m/releases/5.2/django-%{version}.t Source1: https://www.djangoproject.com/m/pgp/Django-%{version}.checksum.txt Source2: %{name}.keyring Source99: python-Django-rpmlintrc +# PATCH-FIX-UPSTREAM https://github.com/django/django/pull/20390 Refs #36499 -- Adjusted test_strip_tags following Python behavior change for incomplete entities. +Patch100: test_strip_tags_incomplete.patch # PATCH-FIX-UPSTREAM https://github.com/django/django/pull/19639 Fixed #36499 -- Adjusted utils_tests.test_html.TestUtilsHtml.test_strip_tags following Python's HTMLParser new behavior. -Patch0: test_strip_tags.patch +# fixed and refined upstream, but some of our interpreters weren't updated to a new version yet and still only carry the patch, so providing the non-conditional version +Patch101: test_strip_tags.patch # PATCH-FIX-UPSTREAM CVE-2025-57833.patch bsc#1248810 Patch1: CVE-2025-57833.patch # PATCH-FIX-UPSTREAM CVE-2025-59681.patch bsc#1250485 diff --git a/test_strip_tags.patch b/test_strip_tags.patch index 2f1363f..28e5e29 100644 --- a/test_strip_tags.patch +++ b/test_strip_tags.patch @@ -10,11 +10,11 @@ Subject: [PATCH] Fixed #36499 -- Adjusted tests/utils_tests/test_html.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) -diff --git a/tests/test_utils/tests.py b/tests/test_utils/tests.py -index 494a0ea8d384..0de19eae9072 100644 ---- a/tests/test_utils/tests.py -+++ b/tests/test_utils/tests.py -@@ -959,10 +959,10 @@ def test_parsing_errors(self): +Index: django-5.2.4/tests/test_utils/tests.py +=================================================================== +--- django-5.2.4.orig/tests/test_utils/tests.py ++++ django-5.2.4/tests/test_utils/tests.py +@@ -945,10 +945,10 @@ class HTMLEqualTests(SimpleTestCase): self.assertHTMLEqual("", "

") error_msg = ( "First argument is not valid HTML:\n" @@ -27,14 +27,14 @@ index 494a0ea8d384..0de19eae9072 100644 with self.assertRaises(HTMLParseError): parse_html("

") -diff --git a/tests/utils_tests/test_html.py b/tests/utils_tests/test_html.py -index 4ce552e79a0d..205eaeca1668 100644 ---- a/tests/utils_tests/test_html.py -+++ b/tests/utils_tests/test_html.py -@@ -142,10 +142,10 @@ def test_strip_tags(self): +Index: django-5.2.4/tests/utils_tests/test_html.py +=================================================================== +--- django-5.2.4.orig/tests/utils_tests/test_html.py ++++ django-5.2.4/tests/utils_tests/test_html.py +@@ -144,10 +144,10 @@ class TestUtilsHtml(SimpleTestCase): ("&gotcha&#;<>", "&gotcha&#;<>"), ("ript>test</script>", "ript>test"), - ("&h", "alert()h"), + ("&h", "alert()&h;"), - (">"), ("X<<<
br>br>br>X", "XX"), diff --git a/test_strip_tags_incomplete.patch b/test_strip_tags_incomplete.patch new file mode 100644 index 0000000..d6be989 --- /dev/null +++ b/test_strip_tags_incomplete.patch @@ -0,0 +1,24 @@ +From 5ca0f62213911a77dd4a62e843db7e420cc98b78 Mon Sep 17 00:00:00 2001 +From: Jacob Walls +Date: Thu, 11 Dec 2025 08:44:19 -0500 +Subject: [PATCH] [5.2.x] Refs #36499 -- Adjusted test_strip_tags following + Python behavior change for incomplete entities. + +Backport of 7b80b2186300620931009fd62c2969f108fe7a62 from main. +--- + tests/utils_tests/test_html.py | 35 +++++++++++++++++++++++++++++----- + 1 file changed, 30 insertions(+), 5 deletions(-) + +Index: django-5.2.4/tests/utils_tests/test_html.py +=================================================================== +--- django-5.2.4.orig/tests/utils_tests/test_html.py ++++ django-5.2.4/tests/utils_tests/test_html.py +@@ -143,7 +144,7 @@ class TestUtilsHtml(SimpleTestCase): + # https://bugs.python.org/issue20288 + ("&gotcha&#;<>", "&gotcha&#;<>"), + ("ript>test</script>", "ript>test"), +- ("&h", "alert()h"), ++ ("&h", "alert()&h;"), + (">br>br>br>X", "XX"), + ("<" * 50 + "a>" * 50, ""),