Mercurial > genshi > mirror
diff markup/tests/output.py @ 158:3f23fafeef99 trunk
* Add test case for SVG content embedded in an HTML document.
* The XHTML serializer now assumes that elements in a foreign namespace (such as SVG or MathML) can be serialized as empty tags (`<foo />`).
author | cmlenz |
---|---|
date | Wed, 16 Aug 2006 21:29:48 +0000 |
parents | 3d4c214c979a |
children | d19e8a2c549e |
line wrap: on
line diff
--- a/markup/tests/output.py +++ b/markup/tests/output.py @@ -108,6 +108,19 @@ output = XML(text).render(XHTMLSerializer) self.assertEqual(text, output) + def test_embedded_svg(self): + text = """<html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg"> + <body> + <button> + <svg:svg width="600px" height="400px"> + <svg:polygon points="50,50 50,300 300,300" /> + </svg:svg> + </button> + </body> + </html>""" + output = XML(text).render(XHTMLSerializer) + self.assertEqual(text, output) + class HTMLSerializerTestCase(unittest.TestCase):