]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Add another small encoding test for xhtml_escape.
authorBen Darnell <ben@bendarnell.com>
Thu, 13 Jun 2013 16:14:52 +0000 (12:14 -0400)
committerBen Darnell <ben@bendarnell.com>
Thu, 13 Jun 2013 16:14:52 +0000 (12:14 -0400)
tornado/test/escape_test.py

index 90573c166e40639ad081ca66f71226b89bdb8a31..0370d77dada9b2dddd5ca8b1a7039de8c6117aaa 100644 (file)
@@ -146,6 +146,9 @@ class EscapeTestCase(unittest.TestCase):
 
             ("<>&\"", "&lt;&gt;&amp;&quot;"),
             ("&amp;", "&amp;amp;"),
+
+            (u("<\u00e9>"), u("&lt;\u00e9&gt;")),
+            (b"<\xc3\xa9>", b"&lt;\xc3\xa9&gt;"),
         ]
         for unescaped, escaped in tests:
             self.assertEqual(utf8(xhtml_escape(unescaped)), utf8(escaped))