diff roundup/htmltemplate.py @ 250:1d428068485c

*gak* ... xmp is Old Skool apparently. Am using pre again by have the option on the plain() template function to escape the text for HTML.
author Richard Jones <richard@users.sourceforge.net>
date Thu, 27 Sep 2001 06:45:58 +0000
parents 8a0d548c07a1
children a4241ddd22d7
line wrap: on
line diff
--- a/roundup/htmltemplate.py	Thu Sep 27 06:36:42 2001 +0000
+++ b/roundup/htmltemplate.py	Thu Sep 27 06:45:58 2001 +0000
@@ -15,7 +15,7 @@
 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 # 
-# $Id: htmltemplate.py,v 1.23 2001-09-10 09:47:18 richard Exp $
+# $Id: htmltemplate.py,v 1.24 2001-09-27 06:45:58 richard Exp $
 
 import os, re, StringIO, urllib, cgi, errno
 
@@ -40,7 +40,7 @@
         for a Link or Multilink property, display the key strings of the
         linked nodes (or the ids if the linked class has no key property)
     '''
-    def __call__(self, property):
+    def __call__(self, property, escape=0):
         if not self.nodeid and self.form is None:
             return '[Field: not called from item]'
         propclass = self.properties[property]
@@ -68,6 +68,8 @@
             value = ', '.join([linkcl.get(i, k) for i in value])
         else:
             s = 'Plain: bad propclass "%s"'%propclass
+        if escape:
+            return cgi.escape(value)
         return value
 
 class Field(Base):
@@ -745,6 +747,11 @@
 
 #
 # $Log: not supported by cvs2svn $
+# Revision 1.23  2001/09/10 09:47:18  richard
+# Fixed bug in the generation of links to Link/Multilink in indexes.
+#   (thanks Hubert Hoegl)
+# Added AssignedTo to the "classic" schema's item page.
+#
 # Revision 1.22  2001/08/30 06:01:17  richard
 # Fixed missing import in mailgw :(
 #

Roundup Issue Tracker: http://roundup-tracker.org/