mirror of
https://github.com/django/django.git
synced 2025-11-19 03:08:59 +00:00
Fixed #36710 -- Fixed a regression in urlize for multipart domain names.
Some checks are pending
Docs / spelling (push) Waiting to run
Docs / blacken-docs (push) Waiting to run
Docs / lint-docs (push) Waiting to run
Linters / flake8 (push) Waiting to run
Linters / isort (push) Waiting to run
Linters / black (push) Waiting to run
Tests / Windows, SQLite, Python 3.14 (push) Waiting to run
Tests / JavaScript tests (push) Waiting to run
Some checks are pending
Docs / spelling (push) Waiting to run
Docs / blacken-docs (push) Waiting to run
Docs / lint-docs (push) Waiting to run
Linters / flake8 (push) Waiting to run
Linters / isort (push) Waiting to run
Linters / black (push) Waiting to run
Tests / Windows, SQLite, Python 3.14 (push) Waiting to run
Tests / JavaScript tests (push) Waiting to run
Thanks Mehraz Hossain Rumman for the report and Bruno Alla for the triage.
Regression in a9fe98d5bd.
This commit is contained in:
parent
dfcc662cf8
commit
125b63ca74
2 changed files with 5 additions and 0 deletions
|
|
@ -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,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -455,6 +455,10 @@ class TestUtilsHtml(SimpleTestCase):
|
|||
'<a href="mailto:idna-2008@%DE%89%DE%A8%DE%80%DE%A7%DE%83%DE%AA.ex'
|
||||
'ample.mv">idna-2008@މިހާރު.example.mv</a>',
|
||||
),
|
||||
(
|
||||
"host.djangoproject.com",
|
||||
'<a href="https://host.djangoproject.com">host.djangoproject.com</a>',
|
||||
),
|
||||
)
|
||||
for value, output in tests:
|
||||
with self.subTest(value=value):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue