diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-04-11 17:49:22 +0000 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-04-11 17:49:22 +0000 |
| commit | e2548ec2a9e2f8dc733bcc72681fd28a34af4dbd (patch) | |
| tree | a22f7032df3d1a35c0b0b8fd9ca0c4a3d11959e4 /django/utils/html.py | |
| parent | f0697570e916022637c6147de3f1dfb2eb360ea6 (diff) | |
Fixed #18071 -- Ignored case sensitivity in urlize utility. Thanks luke@creaturecreative.com and adamzap for the report and the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17898 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils/html.py')
| -rw-r--r-- | django/utils/html.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/utils/html.py b/django/utils/html.py index 78359f97f6..6760f7adad 100644 --- a/django/utils/html.py +++ b/django/utils/html.py @@ -20,8 +20,8 @@ DOTS = [u'·', u'*', u'\u2022', u'•', u'•', u'•'] 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') -simple_url_2_re = re.compile(r'^www\.|^(?!http)\w[^@]+\.(com|edu|gov|int|mil|net|org)$') +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'(<a [^>]*?)target=[^\s>]+') html_gunk_re = re.compile(r'(?:<br clear="all">|<i><\/i>|<b><\/b>|<em><\/em>|<strong><\/strong>|<\/?smallcaps>|<\/?uppercase>)', re.IGNORECASE) |
