[utils] Fix unescapeHTML for misformed string like "&a"" (#13935)

This commit is contained in:
Yen Chi Hsuan 2017-08-19 21:40:53 +08:00
parent f5469da9e6
commit 95f3f7c20a
No known key found for this signature in database
GPG key ID: 3FDDD575826C5C30
3 changed files with 8 additions and 1 deletions

View file

@ -279,6 +279,7 @@ class TestUtil(unittest.TestCase):
self.assertEqual(unescapeHTML('/'), '/')
self.assertEqual(unescapeHTML('é'), 'é')
self.assertEqual(unescapeHTML('�'), '�')
self.assertEqual(unescapeHTML('&a"'), '&a"')
# HTML5 entities
self.assertEqual(unescapeHTML('.''), '.\'')