Show More
@@ -531,8 +531,8 b' class Inspector(Colorable):' | |||||
531 |
|
531 | |||
532 | """ |
|
532 | """ | |
533 | defaults = { |
|
533 | defaults = { | |
534 |
|
|
534 | "text/plain": text, | |
535 |
|
|
535 | "text/html": f"<pre>{html.escape(text)}</pre>", | |
536 | } |
|
536 | } | |
537 |
|
537 | |||
538 | if formatter is None: |
|
538 | if formatter is None: | |
@@ -543,10 +543,7 b' class Inspector(Colorable):' | |||||
543 | if not isinstance(formatted, dict): |
|
543 | if not isinstance(formatted, dict): | |
544 | # Handle the deprecated behavior of a formatter returning |
|
544 | # Handle the deprecated behavior of a formatter returning | |
545 | # a string instead of a mime bundle. |
|
545 | # a string instead of a mime bundle. | |
546 | return { |
|
546 | return {"text/plain": formatted, "text/html": f"<pre>{formatted}</pre>"} | |
547 | 'text/plain': formatted, |
|
|||
548 | 'text/html': '<pre>' + formatted + '</pre>' |
|
|||
549 | } |
|
|||
550 |
|
547 | |||
551 | else: |
|
548 | else: | |
552 | return dict(defaults, **formatted) |
|
549 | return dict(defaults, **formatted) |
General Comments 0
You need to be logged in to leave comments.
Login now