mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #24471 -- Enhanced urlize regex to exclude quotes and angle brackets.
This commit is contained in:
@@ -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+$')
|
||||
|
||||
Reference in New Issue
Block a user