From: <lu...@us...> - 2009-10-21 15:50:25
|
Revision: 321 http://pyscard.svn.sourceforge.net/pyscard/?rev=321&view=rev Author: ludov Date: 2009-10-21 15:50:17 +0000 (Wed, 21 Oct 2009) Log Message: ----------- text containing \n is displayed preformarted Modified Paths: -------------- trunk/contrib/parseATR/parseATRhtml.py Modified: trunk/contrib/parseATR/parseATRhtml.py =================================================================== --- trunk/contrib/parseATR/parseATRhtml.py 2009-10-21 15:39:38 UTC (rev 320) +++ trunk/contrib/parseATR/parseATRhtml.py 2009-10-21 15:50:17 UTC (rev 321) @@ -38,7 +38,10 @@ def colorize(l): text = '<tr><th align="right">' + html_escape(l[0]) + '</th>' if len(l) > 1: - text += '<th align="left">' + html_escape("".join(l[1:])) + '</th></tr>' + t = html_escape("".join(l[1:])) + if '\n' in t: + t = "<pre>" + t + "</pre>" + text += '<th align="left">' + t + '</th></tr>' return text if __name__ == "__main__": This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |