|
1 | | -# $Id: template.py,v 1.4 2001-07-19 06:27:07 anthonybaxter Exp $ |
| 1 | +# $Id: template.py,v 1.5 2001-07-20 07:34:43 richard Exp $ |
2 | 2 |
|
3 | | -import os, re, StringIO, urllib |
| 3 | +import os, re, StringIO, urllib, cgi |
4 | 4 |
|
5 | 5 | import hyperdb, date |
6 | 6 |
|
@@ -68,6 +68,9 @@ def __call__(self, property, size=None, height=None, showid=0): |
68 | 68 | size = size or 30 |
69 | 69 | if value is None: |
70 | 70 | value = '' |
| 71 | + else: |
| 72 | + value = cgi.escape(value) |
| 73 | + value = '"'.join(value.split('"')) |
71 | 74 | s = '<input name="%s" value="%s" size="%s">'%(property, value, size) |
72 | 75 | elif propclass.isLinkType: |
73 | 76 | linkcl = self.db.classes[propclass.classname] |
@@ -697,6 +700,13 @@ def newitem(fp, db, classname, form, replace=re.compile( |
697 | 700 |
|
698 | 701 | # |
699 | 702 | # $Log: not supported by cvs2svn $ |
| 703 | +# Revision 1.4 2001/07/19 06:27:07 anthonybaxter |
| 704 | +# fixing (manually) the (dollarsign)Log(dollarsign) entries caused by |
| 705 | +# my using the magic (dollarsign)Id(dollarsign) and (dollarsign)Log(dollarsign) |
| 706 | +# strings in a commit message. I'm a twonk. |
| 707 | +# |
| 708 | +# Also broke the help string in two. |
| 709 | +# |
700 | 710 | # Revision 1.3 2001/07/19 05:52:22 anthonybaxter |
701 | 711 | # Added CVS keywords Id and Log to all python files. |
702 | 712 | # |
|
0 commit comments