diff --git a/plugins/Web/plugin.py b/plugins/Web/plugin.py index 42150215a..59dee9456 100644 --- a/plugins/Web/plugin.py +++ b/plugins/Web/plugin.py @@ -70,6 +70,10 @@ class Title(HTMLParser.HTMLParser): if name in self.entitydefs: self.title += self.entitydefs[name] + def handle_charref(self, name): + if self.inTitle: + self.title += unichr(int(name)) + class DelayedIrc: def __init__(self, irc): self._irc = irc diff --git a/plugins/Web/test.py b/plugins/Web/test.py index e23568a79..074f38c8e 100644 --- a/plugins/Web/test.py +++ b/plugins/Web/test.py @@ -65,6 +65,9 @@ class WebTestCase(ChannelPluginTestCase): # Checks that the parser doesn't hang on invalid tags self.assertNotError( 'title http://www.youtube.com/watch?v=x4BtiqPN4u8') + self.assertResponse( + 'title http://www.thefreedictionary.com/don%27t', + "don't - definition of don't by The Free Dictionary") def testTitleSnarfer(self): try: