From: richard Date: Fri, 20 Jul 2001 07:34:43 +0000 (+0000) Subject: Quote the value put in the text input value attribute. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c9838baa7043d656c1b177294f6f02caa47c9b38;p=roundup.git Quote the value put in the text input value attribute. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@21 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/template.py b/template.py index cb0a392..85ddc71 100644 --- a/template.py +++ b/template.py @@ -1,6 +1,6 @@ -# $Id: template.py,v 1.4 2001-07-19 06:27:07 anthonybaxter Exp $ +# $Id: template.py,v 1.5 2001-07-20 07:34:43 richard Exp $ -import os, re, StringIO, urllib +import os, re, StringIO, urllib, cgi import hyperdb, date @@ -68,6 +68,9 @@ class Field(Base): size = size or 30 if value is None: value = '' + else: + value = cgi.escape(value) + value = '"'.join(value.split('"')) s = ''%(property, value, size) elif propclass.isLinkType: linkcl = self.db.classes[propclass.classname] @@ -697,6 +700,13 @@ def newitem(fp, db, classname, form, replace=re.compile( # # $Log: not supported by cvs2svn $ +# Revision 1.4 2001/07/19 06:27:07 anthonybaxter +# fixing (manually) the (dollarsign)Log(dollarsign) entries caused by +# my using the magic (dollarsign)Id(dollarsign) and (dollarsign)Log(dollarsign) +# strings in a commit message. I'm a twonk. +# +# Also broke the help string in two. +# # Revision 1.3 2001/07/19 05:52:22 anthonybaxter # Added CVS keywords Id and Log to all python files. #