[2.7] bpo-33256: Replace angle brackets around python object repr to display it in html (GH-6442). by serhiy-storchaka · Pull Request #6650 · python/cpython
Expand Up
@@ -125,7 +125,7 @@ def html(einfo, context=5):
args, varargs, varkw, locals = inspect.getargvalues(frame)
call = ''
if func != '?':
call = 'in ' + strong(func) + \
call = 'in ' + strong(pydoc.html.escape(func)) + \
inspect.formatargvalues(args, varargs, varkw, locals,
formatvalue=lambda value: '=' + pydoc.html.repr(value))
Expand Down Expand Up @@ -285,7 +285,7 @@ def handle(self, info=None):
if self.display: if plain: doc = doc.replace('&', '&').replace('<', '<') doc = pydoc.html.escape(doc) self.file.write('<pre>' + doc + '</pre>\n') else: self.file.write(doc + '\n') Expand Down
Expand Down Expand Up @@ -285,7 +285,7 @@ def handle(self, info=None):
if self.display: if plain: doc = doc.replace('&', '&').replace('<', '<') doc = pydoc.html.escape(doc) self.file.write('<pre>' + doc + '</pre>\n') else: self.file.write(doc + '\n') Expand Down