diff --git a/plugins/Format/plugin.py b/plugins/Format/plugin.py index 4d68c8ada..fad81f471 100644 --- a/plugins/Format/plugin.py +++ b/plugins/Format/plugin.py @@ -149,7 +149,7 @@ class Format(callbacks.Plugin): Returns titlecased. """ - irc.reply(text.title()) + irc.reply(string.capwords(text, " ")) title = wrap(title, ['text']) @internationalizeDocstring diff --git a/plugins/Format/test.py b/plugins/Format/test.py index f891e0dd7..34e3828dd 100644 --- a/plugins/Format/test.py +++ b/plugins/Format/test.py @@ -74,6 +74,7 @@ class FormatTestCase(PluginTestCase): def testTitle(self): self.assertResponse('title foo', 'Foo') self.assertResponse('title foo bar', 'Foo Bar') + self.assertResponse('title foo\'s bar', 'Foo\'s Bar') def testRepr(self): self.assertResponse('repr foo bar baz', '"foo bar baz"')