aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xblogthon.cgi12
1 files changed, 6 insertions, 6 deletions
diff --git a/blogthon.cgi b/blogthon.cgi
index 09e6112..f2a3d0e 100755
--- a/blogthon.cgi
+++ b/blogthon.cgi
@@ -54,12 +54,12 @@ if not ctext: ctext = ""
# Comment to commit?
if cname and ctext and ctitle:
# Prevent XSS hacks
- cname = cname.replace("<", "&lt;")
- cname = cname.replace(">", "&gt;")
- cname = cname.replace("\"", "&quot;")
- ctext = ctext.replace("<", "&lt;")
- ctext = ctext.replace(">", "&gt;")
- ctext = ctext.replace("\"", "&quot;")
+ cname = cname.replace("<", "&lt;") \
+ .replace(">", "&gt;") \
+ .replace("\"", "&quot;")
+ ctext = ctext.replace("<", "&lt;") \
+ .replace(">", "&gt;") \
+ .replace("\"", "&quot;")
# Add comment
comments_file = glob.glob(entries_dir + ctitle + '.comments')