diff --git a/tests/mk_to_db.py b/tests/mk_to_db.py
index 646ad39..20cc915 100755
--- a/tests/mk_to_db.py
+++ b/tests/mk_to_db.py
@@ -256,6 +256,20 @@ frame
         output = md_to_db.MarkDownParse(input_, "")
         self.assertEqual(expected, output)
 
+    def test_entities_are_escaped(self):
+        input_ = u"""\
+<programlisting>
+#include <math.h>
+</programlisting>
+"""
+        expected = u"""\
+<programlisting>
+#include &lt;math.h&gt;
+</programlisting>
+"""
+        output = md_to_db.MarkDownParse(input_, "")
+        self.assertEqual(expected, output)
+
 
 if __name__ == '__main__':
     unittest.main()
