Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Oliver <excid3@gmail.com>2011-09-24 17:02:13 -0500
committerChris Oliver <excid3@gmail.com>2011-09-24 17:02:13 -0500
commit4713430ec8c62b2f24c481b9ae92fc77e09cff4c (patch)
treed8615ad77da06d16e27f1825ea6fd3481e6a60dc
parent4f08a04e1795a3db0c15f718630119d8d46b77b0 (diff)
cgi escape messages
-rw-r--r--logbot.py3
1 files changed, 2 insertions, 1 deletions
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