diff --git a/IPython/core/oinspect.py b/IPython/core/oinspect.py index 43f6707..801cb88 100644 --- a/IPython/core/oinspect.py +++ b/IPython/core/oinspect.py @@ -16,6 +16,7 @@ __all__ = ['Inspector','InspectColors'] import ast import inspect from inspect import signature +import html import linecache import warnings import os @@ -531,7 +532,7 @@ class Inspector(Colorable): """ defaults = { 'text/plain': text, - 'text/html': '
' + text + '
' + 'text/html': '
' + html.escape(text) + '
' } if formatter is None: