From 3c688335af10db87ee59955b25fd97425151cb01 Mon Sep 17 00:00:00 2001 From: mathieui Date: Tue, 1 Apr 2014 23:04:10 +0200 Subject: Fix #2453 (malformed stanzas with stupid plugins) remove xhtml prior to performing stuff --- plugins/shuffle.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/shuffle.py') diff --git a/plugins/shuffle.py b/plugins/shuffle.py index e4fc81c8..3a961bae 100644 --- a/plugins/shuffle.py +++ b/plugins/shuffle.py @@ -4,12 +4,13 @@ Shuffle the words in every message you send in a :ref:`muctab` """ from plugin import BasePlugin from random import shuffle +import xhtml class Plugin(BasePlugin): def init(self): self.api.add_event_handler('muc_say', self.shuffle) def shuffle(self, msg, tab): - split = msg['body'].split() + split = xhtml.clean_text(msg['body']).split() shuffle(split) msg['body'] = ' '.join(split) -- cgit v1.2.3