Loading django/utils/html.py +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ DOTS = ['·', '*', '\u2022', '•', '•', '•'] unencoded_ampersands_re = re.compile(r'&(?!(\w+|#\d+);)') 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_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) Loading tests/defaultfilters/tests.py +2 −0 Original line number Diff line number Diff line Loading @@ -268,6 +268,8 @@ class DefaultFiltersTests(TestCase): '<a href="http://djangoproject.org/" rel="nofollow">djangoproject.org/</a>') self.assertEqual(urlize('info@djangoproject.org'), '<a href="mailto:info@djangoproject.org">info@djangoproject.org</a>') self.assertEqual(urlize('some.organization'), 'some.organization'), # Check urlize with https addresses self.assertEqual(urlize('https://google.com'), Loading Loading
django/utils/html.py +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ DOTS = ['·', '*', '\u2022', '•', '•', '•'] unencoded_ampersands_re = re.compile(r'&(?!(\w+|#\d+);)') 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_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) Loading
tests/defaultfilters/tests.py +2 −0 Original line number Diff line number Diff line Loading @@ -268,6 +268,8 @@ class DefaultFiltersTests(TestCase): '<a href="http://djangoproject.org/" rel="nofollow">djangoproject.org/</a>') self.assertEqual(urlize('info@djangoproject.org'), '<a href="mailto:info@djangoproject.org">info@djangoproject.org</a>') self.assertEqual(urlize('some.organization'), 'some.organization'), # Check urlize with https addresses self.assertEqual(urlize('https://google.com'), Loading