@@ -124,7 +124,7 @@ def html(einfo, context=5):
|
124 | 124 | args, varargs, varkw, locals = inspect.getargvalues(frame) |
125 | 125 | call = '' |
126 | 126 | if func != '?': |
127 | | -call = 'in ' + strong(func) + \ |
| 127 | +call = 'in ' + strong(pydoc.html.escape(func)) + \ |
128 | 128 | inspect.formatargvalues(args, varargs, varkw, locals, |
129 | 129 | formatvalue=lambda value: '=' + pydoc.html.repr(value)) |
130 | 130 | |
@@ -282,7 +282,7 @@ def handle(self, info=None):
|
282 | 282 | |
283 | 283 | if self.display: |
284 | 284 | if plain: |
285 | | -doc = doc.replace('&', '&').replace('<', '<') |
| 285 | +doc = pydoc.html.escape(doc) |
286 | 286 | self.file.write('<pre>' + doc + '</pre>\n') |
287 | 287 | else: |
288 | 288 | self.file.write(doc + '\n') |
|