diff --git a/common/lib/capa/capa/tests/test_html_render.py b/common/lib/capa/capa/tests/test_html_render.py
index 9bc326d7b9..8e343ee1cf 100644
--- a/common/lib/capa/capa/tests/test_html_render.py
+++ b/common/lib/capa/capa/tests/test_html_render.py
@@ -226,6 +226,26 @@ class CapaHtmlRenderTest(unittest.TestCase):
span_element = rendered_html.find('span')
self.assertEqual(span_element.get('attr'), "TEST")
+ def test_xml_comments_and_other_odd_things(self):
+ # Comments and processing instructions should be skipped.
+ xml_str = textwrap.dedent("""\
+
+
+ ]>
+