summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-11-08 02:21:20 +0100
committerFlorent Le Coz <louiz@louiz.org>2011-11-08 02:21:20 +0100
commit03999f1ef08036b7ea25e2239cf7b6bcdb4d76cc (patch)
treeee47d80323e799f07dce036d7da9d620f5d76af5 /plugins
parentb3072bd26138913d0d65bd23bd538a87a1b182f7 (diff)
downloadpoezio-03999f1ef08036b7ea25e2239cf7b6bcdb4d76cc.tar.gz
poezio-03999f1ef08036b7ea25e2239cf7b6bcdb4d76cc.tar.bz2
poezio-03999f1ef08036b7ea25e2239cf7b6bcdb4d76cc.tar.xz
poezio-03999f1ef08036b7ea25e2239cf7b6bcdb4d76cc.zip
Make the rainbow plugin clean existing colors before adding the new colors.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/rainbow.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/rainbow.py b/plugins/rainbow.py
index 838c91f4..0f242027 100644
--- a/plugins/rainbow.py
+++ b/plugins/rainbow.py
@@ -1,4 +1,5 @@
from plugin import BasePlugin
+import xhtml
import random
possible_colors = list(range(256))
@@ -16,4 +17,4 @@ class Plugin(BasePlugin):
self.add_poezio_event_handler('conversation_say', self.rainbowize)
def rainbowize(self, msg):
- msg['body'] = ''.join(['%s%s' % (rand_color(),char,) for char in msg['body']])
+ msg['body'] = ''.join(['%s%s' % (rand_color(),char,) for char in xhtml.clean_text(msg['body'])])