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 , 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 , 5 hours ago
| Version: | 5.2 → 6.0 |
|---|
follow-up: 4 comment:3 by , 5 hours ago
comment:4 by , 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 (next)
comment:5 by , 5 hours ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:6 by , 39 minutes ago
| Has patch: | set |
|---|---|
| Needs tests: | set |
comment:8 by , 24 minutes ago
| Cc: | added |
|---|---|
| Component: | Core (URLs) → Template system |
| Keywords: | urlize added; urlizee removed |
| Needs tests: | unset |
| Severity: | Normal → Release blocker |
| Summary: | ` from django.utils.html import urlize ` mismatch between version → urlize fails to convert domain-only urls from the original top-level domains if a host is given |
| Triage Stage: | Unreviewed → Accepted |
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.
Seems to originate from this change in PR 19781 which was fixing Ticket 35533