summaryrefslogtreecommitdiff
path: root/django/utils/html.py
diff options
context:
space:
mode:
authorMehraz Hossain Rumman <59512321+MehrazRumman@users.noreply.github.com>2025-11-06 04:05:54 +0600
committerJacob Walls <jacobtylerwalls@gmail.com>2025-11-05 17:06:23 -0500
commitca824284425e0a132ccec1e7f2ca9dbef8175795 (patch)
treea310c543ab41455b9f2909d3da2fcc785fcb01b0 /django/utils/html.py
parentcdb93b78770067b7d6a963b4268a034eaf401e72 (diff)
[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.
Diffstat (limited to 'django/utils/html.py')
-rw-r--r--django/utils/html.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/django/utils/html.py b/django/utils/html.py
index 734d7fbfb3..b04d6bc5ee 100644
--- a/django/utils/html.py
+++ b/django/utils/html.py
@@ -297,6 +297,7 @@ class Urlizer:
simple_url_re = _lazy_re_compile(r"^https?://\[?\w", re.IGNORECASE)
simple_url_2_re = _lazy_re_compile(
rf"^www\.|^(?!http)(?:{DomainNameValidator.hostname_re})"
+ rf"(?:{DomainNameValidator.domain_re})"
r"\.(com|edu|gov|int|mil|net|org)($|/.*)$",
re.IGNORECASE,
)