diff -r cf5b910ac4c8 Lib/pydoc.py --- a/Lib/pydoc.py Sat Nov 15 10:58:58 2014 -0800 +++ b/Lib/pydoc.py Mon Nov 17 22:56:05 2014 +0200 @@ -954,7 +954,7 @@ class HTMLDoc(Doc): if not argspec: argspec = '(...)' - decl = title + argspec + (note and self.grey( + decl = title + self.escape(argspec) + (note and self.grey( '%s' % note)) if skipdocs: