|
@@ -376,6 +376,19 @@ class TestUtilsHtml(SimpleTestCase):
|
|
|
+ "한.글." * 15
|
|
|
+ "aaa</a>",
|
|
|
),
|
|
|
+ (
|
|
|
+ # RFC 6068 requires a mailto URI to percent-encode a number of
|
|
|
+ # characters that can appear in <addr-spec>.
|
|
|
+ "yes;this=is&a%valid!email@example.com",
|
|
|
+ '<a href="mailto:yes%3Bthis%3Dis%26a%25valid%21email@example.com"'
|
|
|
+ ">yes;this=is&a%valid!email@example.com</a>",
|
|
|
+ ),
|
|
|
+ (
|
|
|
+ # Urlizer shouldn't urlize the "?org" part of this. But since
|
|
|
+ # it does, RFC 6068 requires percent encoding the "?".
|
|
|
+ "test@example.com?org",
|
|
|
+ '<a href="mailto:test@example.com%3Forg">test@example.com?org</a>',
|
|
|
+ ),
|
|
|
)
|
|
|
for value, output in tests:
|
|
|
with self.subTest(value=value):
|