diff --git a/plugins/Gameknot.py b/plugins/Gameknot.py index fe6800b0d..fed3a1cc7 100644 --- a/plugins/Gameknot.py +++ b/plugins/Gameknot.py @@ -125,6 +125,7 @@ class Gameknot(callbacks.PrivmsgCommandAndRegexp): games = '%s active games' % games if 'Team:' in profile: team = self._gkteam.search(profile).group('name') + team = utils.htmlToText(team) s = '%s (team: %s) is rated %s and has %s ' \ 'and a record of %s, %s, and %s ' \ '(win/loss/draw percentage: %.2f%%/%.2f%%/%.2f%%). %s' % \ diff --git a/test/test_Gameknot.py b/test/test_Gameknot.py index 4221e7166..7d45244d2 100644 --- a/test/test_Gameknot.py +++ b/test/test_Gameknot.py @@ -41,6 +41,9 @@ if network: self.assertError('gkstats %s' % utils.mktemp()) self.assertNotError('gkstats Strike') + def testNoHtmlInTeam(self): + self.assertNotRegexp('gkstats jeffuk', '9608') + def testUrlSnarfer(self): conf.supybot.plugins.Gameknot.gameSnarfer.setValue(True) self.assertNotError('http://gameknot.com/chess.pl?bd=1019508')