Fix Trusted Types violations (round #2) #106395

This commit is contained in:
isidor
2020-09-10 11:52:23 +02:00
parent 01f9355f65
commit 44699b0254
2 changed files with 3 additions and 3 deletions
@@ -367,7 +367,7 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
content.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { outline: none !important; }`);
}
this.styleElement.innerHTML = content.join('\n');
this.styleElement.textContent = content.join('\n');
this.applyStyles();
}
@@ -680,7 +680,7 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
});
container.innerHTML = this.options[longest].text + (!!this.options[longest].decoratorRight ? (this.options[longest].decoratorRight + ' ') : '');
container.textContent = this.options[longest].text + (!!this.options[longest].decoratorRight ? (this.options[longest].decoratorRight + ' ') : '');
elementWidth = dom.getTotalWidth(container);
}
@@ -306,7 +306,7 @@ export class Repl extends ViewPane implements IHistoryNavigationWidget {
const replInputLineHeight = this.replInput.getOption(EditorOption.lineHeight);
// Set the font size, font family, line height and align the twistie to be centered, and input theme color
this.styleElement.innerHTML = `
this.styleElement.textContent = `
.repl .repl-tree .expression {
font-size: ${fontSize}px;
font-family: ${fontFamily};