From 61dae11df52fae71fc3050974ac459f362c9dfd7 Mon Sep 17 00:00:00 2001 From: greg Date: Mon, 20 Jan 2025 08:49:37 +0100 Subject: Fixed #36017 -- Used EmailValidator in urlize to detect emails. --- tests/utils_tests/test_html.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'tests/utils_tests') diff --git a/tests/utils_tests/test_html.py b/tests/utils_tests/test_html.py index 88bfa24925..b7d89bfe59 100644 --- a/tests/utils_tests/test_html.py +++ b/tests/utils_tests/test_html.py @@ -374,15 +374,9 @@ class TestUtilsHtml(SimpleTestCase): ( # RFC 6068 requires a mailto URI to percent-encode a number of # characters that can appear in . - "yes;this=is&a%valid!email@example.com", - 'yes;this=is&a%valid!email@example.com", - ), - ( - # Urlizer shouldn't urlize the "?org" part of this. But since - # it does, RFC 6068 requires percent encoding the "?". - "test@example.com?org", - 'test@example.com?org', + "yes+this=is&a%valid!email@example.com", + 'yes+this=is&a%valid!email@example.com", ), ) for value, output in tests: @@ -402,6 +396,8 @@ class TestUtilsHtml(SimpleTestCase): "foo@.example.com", "foo@localhost", "foo@localhost.", + "test@example?;+!.com", + "email me@example.com,then I'll respond", # trim_punctuation catastrophic tests "(" * 100_000 + ":" + ")" * 100_000, "(" * 100_000 + "&:" + ")" * 100_000, -- cgit v1.3