changeset 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 9d651a24d9d2
children 2f4123c715f1
files roundup/htmltemplate.py roundup/templates/extended/html/msg.index roundup/templates/extended/htmlbase.py
diffstat 3 files changed, 12 insertions(+), 5 deletions(-) [+]
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 :(
 #
--- a/roundup/templates/extended/html/msg.index	Thu Sep 27 06:36:42 2001 +0000
+++ b/roundup/templates/extended/html/msg.index	Thu Sep 27 06:45:58 2001 +0000
@@ -1,4 +1,4 @@
-<!-- $Id: msg.index,v 1.2 2001-09-27 06:36:42 richard Exp $-->
+<!-- $Id: msg.index,v 1.3 2001-09-27 06:45:58 richard Exp $-->
 <tr class="row-hilite">
     <property name="date">
         <td><display call="link('date')"></td>
@@ -8,5 +8,5 @@
     </property>
 </tr>
 <tr bgcolor="ffeaff">
-    <td colspan=2><xmp><display call="plain('content')"></xmp></td>
+    <td colspan=2><pre><display call="plain('content', escape=1)"></pre></td>
 </tr>
--- a/roundup/templates/extended/htmlbase.py	Thu Sep 27 06:36:42 2001 +0000
+++ b/roundup/templates/extended/htmlbase.py	Thu Sep 27 06:45:58 2001 +0000
@@ -192,7 +192,7 @@
     </property>
 </tr>
 <tr bgcolor="ffeaff">
-    <td colspan=2><xmp><display call="plain('content')"></xmp></td>
+    <td colspan=2><pre><display call="plain('content', escape=1)"></pre></td>
 </tr>
 """
 

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