Opened 7 hours ago

Last modified 24 minutes ago

#36710 assigned Bug

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: Accepted
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 (8)

comment:1 by Mehraz Hossain Rumman, 7 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, 5 hours ago

Version: 5.26.0

comment:3 by Bruno Alla, 5 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, 5 hours ago

Replying to Bruno Alla:

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


Can you assign me this issue ?

Version 0, edited 5 hours ago by Mehraz Hossain Rumman (next)

comment:5 by Mehraz Hossain Rumman, 5 hours ago

Owner: set to Mehraz Hossain Rumman
Status: newassigned

comment:6 by Mehraz Hossain Rumman, 39 minutes ago

Has patch: set
Needs tests: set

comment:8 by Jacob Walls, 24 minutes 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 "
Note: See TracTickets for help on using tickets.
Back to Top