[med-svn] r1383 - trunk/community/infrastructure/test

tille at alioth.debian.org tille at alioth.debian.org
Fri Feb 15 21:16:39 UTC 2008


Author: tille
Date: 2008-02-15 21:16:38 +0000 (Fri, 15 Feb 2008)
New Revision: 1383

Modified:
   trunk/community/infrastructure/test/cddtasktools.py
Log:
Turn http://... strings into links


Modified: trunk/community/infrastructure/test/cddtasktools.py
===================================================================
--- trunk/community/infrastructure/test/cddtasktools.py	2008-02-15 20:14:16 UTC (rev 1382)
+++ trunk/community/infrastructure/test/cddtasktools.py	2008-02-15 21:16:38 UTC (rev 1383)
@@ -58,7 +58,8 @@
             LongDesc += "<br />\n"
         else:
             # This is to sanitize output for XHTML pages. --David
-            LongDesc += line.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;") + ' \n'
+            line = line.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;") + ' \n'
+            LongDesc += re.sub('(http://[-./\w]+)', '<a href="\\1">\\1</a>', line)
     return (ShortDesc, LongDesc)
 
 




More information about the debian-med-commit mailing list