|
15 | 15 | # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
16 | 16 | # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
17 | 17 | # |
18 | | -# $Id: htmltemplate.py,v 1.37 2001-10-31 06:24:35 richard Exp $ |
| 18 | +# $Id: htmltemplate.py,v 1.38 2001-10-31 06:58:51 richard Exp $ |
19 | 19 |
|
20 | 20 | import os, re, StringIO, urllib, cgi, errno |
21 | 21 |
|
|
28 | 28 | except ImportError: |
29 | 29 | StructuredText = None |
30 | 30 |
|
31 | | - |
32 | 31 | class TemplateFunctions: |
33 | 32 | def __init__(self): |
34 | 33 | self.form = None |
@@ -79,7 +78,7 @@ def do_plain(self, property, escape=0): |
79 | 78 | else: |
80 | 79 | s = 'Plain: bad propclass "%s"'%propclass |
81 | 80 | if escape: |
82 | | - return cgi.escape(value) |
| 81 | + value = cgi.escape(value) |
83 | 82 | return value |
84 | 83 |
|
85 | 84 | def do_stext(self, property, escape=0): |
@@ -387,8 +386,8 @@ def do_note(self, rows=5, cols=80): |
387 | 386 | go along with a change. |
388 | 387 | ''' |
389 | 388 | # TODO: pull the value from the form |
390 | | - return '<textarea name="__note" rows=%s cols=%s></textarea>'%(rows, |
391 | | - cols) |
| 389 | + return '<textarea name="__note" wrap="hard" rows=%s cols=%s>'\ |
| 390 | + '</textarea>'%(rows, cols) |
392 | 391 |
|
393 | 392 | # XXX new function |
394 | 393 | def do_list(self, property, reverse=0): |
@@ -844,6 +843,9 @@ def render(self, form): |
844 | 843 |
|
845 | 844 | # |
846 | 845 | # $Log: not supported by cvs2svn $ |
| 846 | +# Revision 1.37 2001/10/31 06:24:35 richard |
| 847 | +# Added do_stext to htmltemplate, thanks Brad Clements. |
| 848 | +# |
847 | 849 | # Revision 1.36 2001/10/28 22:51:38 richard |
848 | 850 | # Fixed ENOENT/WindowsError thing, thanks Juergen Hermann |
849 | 851 | # |
|
0 commit comments