Opened 23 hours ago

Closed 14 hours ago

Last modified 13 hours ago

#36710 closed Bug (fixed)

urlize fails to convert domain-only urls from the original top-level domains if a host is given

Reported by: Mehraz Hossain Rumman Owned by: Mehraz Hossain Rumman
Component: Template system Version: 6.0
Severity: Release blocker Keywords: urlize
Cc: Mehraz Hossain Rumman, JaeHyuckSa Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

when I am runing tests for django 5.2 this URL : as.d8f.ghj8.gov , It is treated as correct URLS but for when I am running tests for djangomain it shows the URL is incorrect. is there any change in URL validation ?

Change History (11)

comment:1 by Mehraz Hossain Rumman, 23 hours ago

Summary: `from django.utils.html import urlize` mismatch between version` from django.utils.html import urlize ` mismatch between version

comment:2 by Bruno Alla, 22 hours ago

Version: 5.26.0

comment:3 by Bruno Alla, 21 hours ago

Seems to originate from this change in PR 19781 which was fixing Ticket 35533

in reply to:  3 comment:4 by Mehraz Hossain Rumman, 21 hours ago

Replying to Bruno Alla:

Seems to originate from this change in PR 19781 which was fixing Ticket 35533


Last edited 21 hours ago by Mehraz Hossain Rumman (previous) (diff)

comment:5 by Mehraz Hossain Rumman, 21 hours ago

Owner: set to Mehraz Hossain Rumman
Status: newassigned

comment:6 by Mehraz Hossain Rumman, 17 hours ago

Has patch: set
Needs tests: set

comment:8 by Jacob Walls, 17 hours ago

Cc: JaeHyuckSa added
Component: Core (URLs)Template system
Keywords: urlize added; urlizee removed
Needs tests: unset
Severity: NormalRelease blocker
Summary: ` from django.utils.html import urlize ` mismatch between versionurlize fails to convert domain-only urls from the original top-level domains if a host is given
Triage Stage: UnreviewedAccepted

Thanks for the report (and Bruno for the triage).

Failing test:

diff --git a/tests/utils_tests/test_html.py b/tests/utils_tests/test_html.py
index 681071bf03..0c274a0cbc 100644
--- a/tests/utils_tests/test_html.py
+++ b/tests/utils_tests/test_html.py
@@ -425,6 +425,10 @@ class TestUtilsHtml(SimpleTestCase):
                 "http://www.foo.bar/",
                 '<a href="http://www.foo.bar/">http://www.foo.bar/</a>',
             ),
+            (
+                "host.djangoproject.com",
+                '<a href="http://host.djangoproject.com">host.djangoproject.com</a>',
+            ),
             (
                 "Look on www.نامه‌ای.com.",
                 "Look on <a "

comment:9 by Jacob Walls, 14 hours ago

Triage Stage: AcceptedReady for checkin

comment:10 by GitHub <noreply@…>, 14 hours ago

Resolution: fixed
Status: assignedclosed

In 125b63ca:

Fixed #36710 -- Fixed a regression in urlize for multipart domain names.

Thanks Mehraz Hossain Rumman for the report and Bruno Alla for the triage.

Regression in a9fe98d5bd4212d069afe8316101984aadecfbb2.

comment:11 by Jacob Walls <jacobtylerwalls@…>, 13 hours ago

In ca824284:

[6.0.x] Fixed #36710 -- Fixed a regression in urlize for multipart domain names.

Thanks Mehraz Hossain Rumman for the report and Bruno Alla for the triage.

Regression in a9fe98d5bd4212d069afe8316101984aadecfbb2.
Backport of 125b63ca745bace1e098ed3c7362d59136f68a8b from main.

Note: See TracTickets for help on using tickets.
Back to Top