Package: python-trml2pdf
Version: 1.0-1

We've just discovered a problem while using trml2pdf:

If the source RML file contains entities (e.g. "<") in an xpre or para tag, 
it does not correctly pass these on to the reportlab library.

The entity should be printed out as "<", but instead nothing is shown.

This happens because the trml2pdf XML parser already decodes the entity. 
Reportlab then parses the data again (to find formatting tags). Therefore the 
data gets decoded twice, which is obviously wrong.

A patch that fixes the bug (for Text and CDATA sections in textual nodes) is 
attached.

Thanks in advance for taking a look at this!

Best Regards,
Lukas

-- 
Lukas Fittl
Development and Operations - Nessus Internet Dienstleistungs GmbH
diff -Naur python-trml2pdf-1.0.orig/trml2pdf/trml2pdf.py python-trml2pdf-1.0/trml2pdf/trml2pdf.py
--- python-trml2pdf-1.0.orig/trml2pdf/trml2pdf.py	2004-09-27 19:06:11.000000000 +0200
+++ python-trml2pdf-1.0/trml2pdf/trml2pdf.py	2008-02-03 20:00:46.000000000 +0100
@@ -378,9 +378,9 @@
 					self._textual(n)
 				rc += n.toxml()
 			elif (n.nodeType == node.CDATA_SECTION_NODE):
-				rc += n.data
+				rc += n.toxml()
 			elif (n.nodeType == node.TEXT_NODE):
-				rc += n.data
+				rc += n.toxml()
 		return rc.encode(encoding)
 
 	def _table(self, node):
_______________________________________________
Python-modules-team mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/python-modules-team

Reply via email to