Issue 20662: Pydoc doesn't escape parameter defaults in html (original ) (raw ) Issue20662
Created on 2014-02-17 17:08 by serhiy.storchaka , last changed 2022-04-11 14:57 by admin . This issue is now closed .
Messages (5)
msg211426 - (view)
Author: Serhiy Storchaka (serhiy.storchaka) *
Date: 2014-02-17 17:08
Pydoc doesn't escape parameter defaults in generated html files. For example for the socket.__init__() method in the socket module following html code is generated: __init__ (self, family=<AddressFamily.AF_INET: 2>, type=<SocketType.SOCK_STREAM: 1>, proto=0, fileno=None) As result <AddressFamily.AF_INET: 2> and <SocketType.SOCK_STREAM: 1> aren't visible in browser (they are illegal html tags).
msg231294 - (view)
Author: Serhiy Storchaka (serhiy.storchaka) *
Date: 2014-11-17 21:09
Here is a patch which fixes this issue. Html formatting was broken by .
msg231295 - (view)
Author: Larry Hastings (larry) *
Date: 2014-11-17 21:13
LGTM
msg231301 - (view)
Author: Roundup Robot (python-dev)
Date: 2014-11-17 21:51
New changeset cf2e424e0413 by Serhiy Storchaka in branch '3.4': Issue #20662 : Argspec now is escaped in html output of pydoc. https://hg.python.org/cpython/rev/cf2e424e0413 New changeset 1855b5c3da61 by Serhiy Storchaka in branch 'default': Issue #20662 : Argspec now is escaped in html output of pydoc. https://hg.python.org/cpython/rev/1855b5c3da61
msg231303 - (view)
Author: Serhiy Storchaka (serhiy.storchaka) *
Date: 2014-11-17 21:57
Thanks for the review Larry. There is related minor issue. The formatvalue method is no longer used in HTMLDoc. This can break user code which inherits HTMLDoc and overrides formatvalue.
History
Date
User
Action
Args
2022-04-11 14:57:58
admin
set
github: 64861
2014-11-17 21:57:56
serhiy.storchaka
set
status: open -> closedmessages: + assignee: serhiy.storchaka resolution: fixedstage: patch review -> resolved
2014-11-17 21:51:00
python-dev
set
nosy: + python-dev messages: +
2014-11-17 21:13:26
larry
set
messages: +
2014-11-17 21:09:05
serhiy.storchaka
set
files: + pydoc_escape_argspec.patch versions: + Python 3.5keywords: + patch nosy: + larry messages: + stage: patch review
2014-02-17 17:08:17
serhiy.storchaka
create