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