Fix bug #1043863, urlquoted text in reply.

This commit is contained in:
James Vega 2004-10-11 11:43:15 +00:00
parent 5bc91113fe
commit 163d835502
2 changed files with 5 additions and 1 deletions

View File

@ -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:

View File

@ -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: