summaryrefslogtreecommitdiffstats
path: root/lib/python/web_support.py
diff options
context:
space:
mode:
authorFlorian Weimer <fw@deneb.enyo.de>2005-10-20 12:24:28 +0000
committerFlorian Weimer <fw@deneb.enyo.de>2005-10-20 12:24:28 +0000
commitf6354f287df50d41d8b4fd1dd46240fa33b7056d (patch)
treee0bf43e0f3d77aa1fd93d4a42dc2b835ba14ce9c /lib/python/web_support.py
parentee441af66b76ea20bba5447f1a0a2f624a5977e3 (diff)
lib/python/web_support.py (make_pre);
Fix bug which caused make_pre to include only the last element of the passed list in its output. (__test); Regression test. git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@2509 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'lib/python/web_support.py')
-rw-r--r--lib/python/web_support.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/python/web_support.py b/lib/python/web_support.py
index 8a2c96e63e..de174bd510 100644
--- a/lib/python/web_support.py
+++ b/lib/python/web_support.py
@@ -422,7 +422,7 @@ def make_pre(lines):
for l in lines:
append(l)
append('\n')
- return tag('pre', ''.join(l))
+ return tag('pre', ''.join(r))
def make_menu(convert, *entries):
"""Creates an unnumbered list of hyperlinks.
@@ -676,6 +676,7 @@ def __test():
== '<span class="red">green</span>'
assert TD(A("http://www.example.net/", "example")).toString() \
== '<td><a href="http://www.example.net/">example</a></td>'
+ assert make_pre(['a', 'b']).toString() == '<pre>a\nb\n</pre>'
s = cStringIO.StringIO()
RedirectResult(u.scriptRelativeFull("123")).flatten(s.write)

© 2014-2024 Faster IT GmbH | imprint | privacy policy