@@ -17,7 +17,7 @@ import { IEditorService } from 'vs/workbench/services/editor/common/editorServic
1717import { IExtensionService , IExtensionsStatus , IExtensionHostProfile } from 'vs/workbench/services/extensions/common/extensions' ;
1818import { IListVirtualDelegate , IListRenderer } from 'vs/base/browser/ui/list/list' ;
1919import { WorkbenchList } from 'vs/platform/list/browser/listService' ;
20- import { append , $ , addClass , toggleClass , Dimension , clearNode } from 'vs/base/browser/dom' ;
20+ import { append , $ , reset , addClass , toggleClass , Dimension , clearNode } from 'vs/base/browser/dom' ;
2121import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar' ;
2222import { dispose , IDisposable } from 'vs/base/common/lifecycle' ;
2323import { RunOnceScheduler } from 'vs/base/common/async' ;
@@ -38,8 +38,7 @@ import { randomPort } from 'vs/base/node/ports';
3838import { IContextKeyService , RawContextKey , IContextKey } from 'vs/platform/contextkey/common/contextkey' ;
3939import { IStorageService } from 'vs/platform/storage/common/storage' ;
4040import { ILabelService } from 'vs/platform/label/common/label' ;
41- import { renderCodicons } from 'vs/base/common/codicons' ;
42- import { escape } from 'vs/base/common/strings' ;
41+ import { renderCodiconsAsElement } from 'vs/base/browser/codicons' ;
4342import { ExtensionIdentifier , ExtensionType , IExtensionDescription } from 'vs/platform/extensions/common/extensions' ;
4443import { REMOTE_HOST_SCHEME } from 'vs/platform/remote/common/remoteHosts' ;
4544import { SlowExtensionAction } from 'vs/workbench/contrib/extensions/electron-browser/extensionsSlowActions' ;
@@ -410,32 +409,28 @@ export class RuntimeExtensionsEditor extends EditorPane {
410409 clearNode ( data . msgContainer ) ;
411410
412411 if ( this . _extensionHostProfileService . getUnresponsiveProfile ( element . description . identifier ) ) {
413- const el = $ ( 'span' ) ;
414- el . innerHTML = renderCodicons ( escape ( ` $(alert) Unresponsive` ) ) ;
412+ const el = $ ( 'span' , undefined , ...renderCodiconsAsElement ( ` $(alert) Unresponsive` ) ) ;
415413 el . title = nls . localize ( 'unresponsive.title' , "Extension has caused the extension host to freeze." ) ;
416414 data . msgContainer . appendChild ( el ) ;
417415 }
418416
419417 if ( isNonEmptyArray ( element . status . runtimeErrors ) ) {
420- const el = $ ( 'span' ) ;
421- el . innerHTML = renderCodicons ( escape ( `$(bug) ${ nls . localize ( 'errors' , "{0} uncaught errors" , element . status . runtimeErrors . length ) } ` ) ) ;
418+ const el = $ ( 'span' , undefined , ...renderCodiconsAsElement ( `$(bug) ${ nls . localize ( 'errors' , "{0} uncaught errors" , element . status . runtimeErrors . length ) } ` ) ) ;
422419 data . msgContainer . appendChild ( el ) ;
423420 }
424421
425422 if ( element . status . messages && element . status . messages . length > 0 ) {
426- const el = $ ( 'span' ) ;
427- el . innerHTML = renderCodicons ( escape ( `$(alert) ${ element . status . messages [ 0 ] . message } ` ) ) ;
423+ const el = $ ( 'span' , undefined , ...renderCodiconsAsElement ( `$(alert) ${ element . status . messages [ 0 ] . message } ` ) ) ;
428424 data . msgContainer . appendChild ( el ) ;
429425 }
430426
431427 if ( element . description . extensionLocation . scheme !== 'file' ) {
432- const el = $ ( 'span' ) ;
433- el . innerHTML = renderCodicons ( escape ( `$(remote) ${ element . description . extensionLocation . authority } ` ) ) ;
428+ const el = $ ( 'span' , undefined , ...renderCodiconsAsElement ( `$(remote) ${ element . description . extensionLocation . authority } ` ) ) ;
434429 data . msgContainer . appendChild ( el ) ;
435430
436431 const hostLabel = this . _labelService . getHostLabel ( REMOTE_HOST_SCHEME , this . _environmentService . configuration . remoteAuthority ) ;
437432 if ( hostLabel ) {
438- el . innerHTML = renderCodicons ( escape ( `$(remote) ${ hostLabel } ` ) ) ;
433+ reset ( el , ... renderCodiconsAsElement ( `$(remote) ${ hostLabel } ` ) ) ;
439434 }
440435 }
441436
0 commit comments