@@ -316,22 +316,6 @@ export class CellOutput extends React.Component<ICellOutputProps> {
316
316
input = JSON . stringify ( output . data ) ;
317
317
renderWithScrollbars = true ;
318
318
isText = true ;
319
- } else if (
320
- output . output_type === 'execute_result' &&
321
- input &&
322
- input . hasOwnProperty ( 'text/plain' ) &&
323
- ! input . hasOwnProperty ( 'text/html' )
324
- ) {
325
- // Plain text should actually be shown as html so that escaped HTML shows up correctly
326
- mimeType = 'text/html' ;
327
- isText = true ;
328
- isError = false ;
329
- renderWithScrollbars = true ;
330
- // tslint:disable-next-line: no-any
331
- const text = ( input as any ) [ 'text/plain' ] ;
332
- input = {
333
- 'text/html' : lodashEscape ( concatMultilineString ( text ) )
334
- } ;
335
319
} else if ( output . output_type === 'stream' ) {
336
320
mimeType = 'text/html' ;
337
321
isText = true ;
@@ -341,7 +325,7 @@ export class CellOutput extends React.Component<ICellOutputProps> {
341
325
const stream = output as nbformat . IStream ; // NOSONAR
342
326
const concatted = lodashEscape ( concatMultilineString ( stream . text ) ) ;
343
327
input = {
344
- 'text/html' : concatted // XML tags should have already been escaped.
328
+ 'text/html' : concatted
345
329
} ;
346
330
347
331
// Output may have ascii colorization chars in it.
@@ -401,12 +385,6 @@ export class CellOutput extends React.Component<ICellOutputProps> {
401
385
data = fixMarkdown ( concatMultilineString ( data as nbformat . MultilineString , true ) , true ) ;
402
386
}
403
387
404
- // Make sure text output is escaped (nteract texttransform won't)
405
- if ( mimeType === 'text/plain' && data ) {
406
- data = lodashEscape ( data . toString ( ) ) ;
407
- mimeType = 'text/html' ;
408
- }
409
-
410
388
return {
411
389
isText,
412
390
isError,
0 commit comments