@@ -126,7 +126,8 @@ type DisposableStore = ReturnType<typeof createDisposableStore>;
126
126
function renderError (
127
127
outputInfo : OutputItem ,
128
128
outputElement : HTMLElement ,
129
- ctx : IRichRenderContext
129
+ ctx : IRichRenderContext ,
130
+ trustHTML : boolean
130
131
) : IDisposable {
131
132
const disposableStore = createDisposableStore ( ) ;
132
133
@@ -146,7 +147,7 @@ function renderError(
146
147
outputElement . classList . add ( 'traceback' ) ;
147
148
148
149
const outputScrolling = scrollingEnabled ( outputInfo , ctx . settings ) ;
149
- const content = createOutputContent ( outputInfo . id , [ err . stack ?? '' ] , ctx . settings . lineLimit , outputScrolling , true ) ;
150
+ const content = createOutputContent ( outputInfo . id , [ err . stack ?? '' ] , ctx . settings . lineLimit , outputScrolling , trustHTML ) ;
150
151
const contentParent = document . createElement ( 'div' ) ;
151
152
contentParent . classList . toggle ( 'word-wrap' , ctx . settings . outputWordWrap ) ;
152
153
disposableStore . push ( ctx . onDidChangeSettings ( e => {
@@ -413,7 +414,7 @@ export const activate: ActivationFunction<void> = (ctx) => {
413
414
case 'application/vnd.code.notebook.error' :
414
415
{
415
416
disposables . get ( outputInfo . id ) ?. dispose ( ) ;
416
- const disposable = renderError ( outputInfo , element , latestContext ) ;
417
+ const disposable = renderError ( outputInfo , element , latestContext , ctx . workspace . isTrusted ) ;
417
418
disposables . set ( outputInfo . id , disposable ) ;
418
419
}
419
420
break ;
0 commit comments