prevent urls with no protocol that are too short from being highlighted

This commit is contained in:
selberhad 2022-10-03 20:49:44 -04:00
parent 80878fb124
commit dfb623ce90
2 changed files with 11 additions and 1 deletions

View file

@ -356,3 +356,9 @@ class TestTextToHTMLparser(TestCase):
self.parser.convert_urls('Awwww.this should not be highlighted'),
'Awwww.this should not be highlighted'
)
def test_invalid_www_url(self):
self.assertEqual(
self.parser.convert_urls('www.t'),
'www.t'
)