Skip to content

Commit

Permalink
Use innerText over innerHTML, microsoft#106285
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Sep 8, 2020
1 parent 7b08ea7 commit 12fc18b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/vs/workbench/browser/parts/compositePart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import 'vs/css!./media/compositepart';
import * as nls from 'vs/nls';
import { defaultGenerator } from 'vs/base/common/idGenerator';
import { IDisposable, dispose, DisposableStore, MutableDisposable } from 'vs/base/common/lifecycle';
import * as strings from 'vs/base/common/strings';
import { Emitter } from 'vs/base/common/event';
import * as errors from 'vs/base/common/errors';
import { ToolBar } from 'vs/base/browser/ui/toolbar/toolbar';
Expand Down Expand Up @@ -413,8 +412,8 @@ export abstract class CompositePart<T extends Composite> extends Part {

const $this = this;
return {
updateTitle: (id, title, keybinding) => {
titleLabel.innerHTML = strings.escape(title);
updateTitle: (_id, title, keybinding) => {
titleLabel.innerText = title;
titleLabel.title = keybinding ? nls.localize('titleTooltip', "{0} ({1})", title, keybinding) : title;
},

Expand Down

0 comments on commit 12fc18b

Please sign in to comment.