From b474ffe63a3f99daeef2324a674f7ddfbb653c41 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Mon, 1 Apr 2013 15:37:37 +0200 Subject: Fixed #20172 -- Ensured urlize supports IPv4/IPv6 addresses Thanks Marc Aymerich for the report and the initial patch. --- django/utils/html.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django/utils/html.py') diff --git a/django/utils/html.py b/django/utils/html.py index a9ebd17935..650e8485ab 100644 --- a/django/utils/html.py +++ b/django/utils/html.py @@ -26,7 +26,7 @@ DOTS = ['·', '*', '\u2022', '•', '•', '•'] unencoded_ampersands_re = re.compile(r'&(?!(\w+|#\d+);)') unquoted_percents_re = re.compile(r'%(?![0-9A-Fa-f]{2})') word_split_re = re.compile(r'(\s+)') -simple_url_re = re.compile(r'^https?://\w', re.IGNORECASE) +simple_url_re = re.compile(r'^https?://\[?\w', re.IGNORECASE) simple_url_2_re = re.compile(r'^www\.|^(?!http)\w[^@]+\.(com|edu|gov|int|mil|net|org)$', re.IGNORECASE) simple_email_re = re.compile(r'^\S+@\S+\.\S+$') link_target_attribute_re = re.compile(r'(]*?)target=[^\s>]+') -- cgit v1.3