aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Ritter <xeno@goliath.thehappy.de>2009-03-08 20:20:18 +0100
committerStefan Ritter <xeno@goliath.thehappy.de>2009-03-08 20:20:18 +0100
commitb2bc8d5a068274fffa1f2cb8572e00b8ccd243d8 (patch)
tree090c24193d27241fae31b44f916b668a630b5b84
parenteb925c903778dd9bde5e4c54b6bea3af19e972ad (diff)
Comments:
* Bugfix when sending more then one line ;)
-rwxr-xr-xblogthon.cgi6
1 files changed, 4 insertions, 2 deletions
diff --git a/blogthon.cgi b/blogthon.cgi
index a4616cf..c1657ed 100755
--- a/blogthon.cgi
+++ b/blogthon.cgi
@@ -70,7 +70,9 @@ if cname and ctext and ctitle:
content = open(comments_file[0], "a+")
content.write("-." + cname + "\n")
content.write("+." + time.asctime() + "\n")
- content.write("." + ctext + "\n")
+ ctext = ctext.split("\n")
+ for line in ctext:
+ content.write("." + line + "\n")
content.close()
print 'Content-type: text/html\n'
@@ -193,7 +195,7 @@ else: # Show regular entry
print ' <form method="post">'
print ' <input type="hidden" name="ctitle" value="' + title + '">'
print ' <label for="cname">name:</label><input type="text" id="cname" name="cname">'
- print ' <br /><label for="ctext">text:</label><textarea rows="5" id="ctext" name="ctext" wrap="hard"></textarea>'
+ print ' <br /><label for="ctext">text:</label><textarea rows="5" id="ctext" name="ctext"></textarea>'
print ' <br /><input type="submit" id="submit" value="post comment">'
print ' </form>'