diff options
| author | Tim Graham <timograham@gmail.com> | 2015-03-04 09:36:34 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-03-10 19:24:46 -0400 |
| commit | 3ed9c7bdfe9f40d31dadb6734a5692c8b9d6d6dc (patch) | |
| tree | 7c9e14442e7b6ee74d3a247eb9376fc3f55e20fe /django/utils/html.py | |
| parent | 7b1a67cce52e5c191fbfa1bca501c6f0222db019 (diff) | |
Fixed #24471 -- Enhanced urlize regex to exclude quotes and angle brackets.
Diffstat (limited to 'django/utils/html.py')
| -rw-r--r-- | django/utils/html.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/html.py b/django/utils/html.py index 779155e88c..9f9fbdb2a5 100644 --- a/django/utils/html.py +++ b/django/utils/html.py @@ -26,7 +26,7 @@ WRAPPING_PUNCTUATION = [('(', ')'), ('<', '>'), ('[', ']'), ('<', '>'), (' DOTS = ['·', '*', '\u2022', '•', '•', '•'] unencoded_ampersands_re = re.compile(r'&(?!(\w+|#\d+);)') -word_split_re = re.compile(r'(\s+)') +word_split_re = re.compile(r'''([\s<>"']+)''') 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+$') |
