From 4713430ec8c62b2f24c481b9ae92fc77e09cff4c Mon Sep 17 00:00:00 2001 From: Chris Oliver Date: Sat, 24 Sep 2011 17:02:13 -0500 Subject: cgi escape messages --- logbot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/logbot.py b/logbot.py index 5b5b977..2c0fbcc 100644 --- a/logbot.py +++ b/logbot.py @@ -31,6 +31,7 @@ __copyright__ = "Copyright (c) Chris Oliver" __license__ = "GPL2" +import cgi import os from ftplib import FTP from time import strftime @@ -174,7 +175,7 @@ class Logbot(SingleServerIRCBot): try: msg = msg.replace("%channel%", event.target()) except: pass msg = msg.replace("%color%", self.color(nm_to_n(event.source()))) - try: msg = msg.replace("%message%", event.arguments()[0]) + try: msg = msg.replace("%message%", cgi.escape(event.arguments()[0])) except: pass return msg -- cgit v1.2.3-70-g09d2