aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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>'