From 729c4981a73b1eadd183066b120f65d6b9d0db19 Mon Sep 17 00:00:00 2001 From: richard Date: Thu, 27 Sep 2001 06:45:58 +0000 Subject: [PATCH] *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. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@258 57a73879-2fb5-44c3-a270-3262357dd7e2 --- roundup/htmltemplate.py | 11 +++++++++-- roundup/templates/extended/html/msg.index | 4 ++-- roundup/templates/extended/htmlbase.py | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/roundup/htmltemplate.py b/roundup/htmltemplate.py index de6f10d..c073a75 100644 --- a/roundup/htmltemplate.py +++ b/roundup/htmltemplate.py @@ -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 @@ class Plain(Base): 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 @@ class Plain(Base): 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 @@ def newitem(client, templates, db, classname, form, replace=re.compile( # # $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 :( # diff --git a/roundup/templates/extended/html/msg.index b/roundup/templates/extended/html/msg.index index b7bdfa7..4331e27 100644 --- a/roundup/templates/extended/html/msg.index +++ b/roundup/templates/extended/html/msg.index @@ -1,4 +1,4 @@ - + @@ -8,5 +8,5 @@ - <display call="plain('content')"> +
diff --git a/roundup/templates/extended/htmlbase.py b/roundup/templates/extended/htmlbase.py index 45bb7ba..bee173e 100644 --- a/roundup/templates/extended/htmlbase.py +++ b/roundup/templates/extended/htmlbase.py @@ -192,7 +192,7 @@ msgDOTindex = """