diff --git a/plugins/Babelfish.py b/plugins/Babelfish.py index 473cc9777..7b7414237 100644 --- a/plugins/Babelfish.py +++ b/plugins/Babelfish.py @@ -117,7 +117,7 @@ class Babelfish(callbacks.Privmsg): irc.error('I only speak %s.' % utils.commaAndify(langs)) return translation = babelfish.translate(text, fromLang, toLang) - irc.reply(translation) + irc.reply(utils.htmlToText(translation)) except (KeyError, babelfish.LanguageNotAvailableError), e: languages = self.registryValue('languages', chan) if languages: diff --git a/test/test_Babelfish.py b/test/test_Babelfish.py index e48c7ddef..513af5bea 100644 --- a/test/test_Babelfish.py +++ b/test/test_Babelfish.py @@ -71,6 +71,10 @@ if network: finally: langs.setValue(orig) + def testHtmlToText(self): + self.assertNotRegexp('translate fr en Qu\'y', ''') + self.assertNotRegexp('babelize fr en Qu\'y', ''') + # vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: