Skip to content

Commit 76d1c47

Browse files
author
glic3rinu
committed
Fixed IPv6 support for urlize_quoted_links
1 parent 7d7c03e commit 76d1c47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rest_framework/templatetags/rest_framework.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def add_class(value, css_class):
181181
WRAPPING_PUNCTUATION = [('(', ')'), ('<', '>'), ('[', ']'), ('&lt;', '&gt;'),
182182
('"', '"'), ("'", "'")]
183183
word_split_re = re.compile(r'(\s+)')
184-
simple_url_re = re.compile(r'^https?://\w', re.IGNORECASE)
184+
simple_url_re = re.compile(r'^https?://\[?\w', re.IGNORECASE)
185185
simple_url_2_re = re.compile(r'^www\.|^(?!http)\w[^@]+\.(com|edu|gov|int|mil|net|org)$', re.IGNORECASE)
186186
simple_email_re = re.compile(r'^\S+@\S+\.\S+$')
187187

0 commit comments

Comments
 (0)