Skip to content

Commit

Permalink
use textContent instead of innerHTML (for #106285)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeschli committed Sep 9, 2020
1 parent 420aa32 commit f0dd2d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/vs/base/browser/ui/codicons/codiconStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function initialize() {
for (let c of iconRegistry.all) {
rules.push(formatRule(c));
}
codiconStyleSheet.innerHTML = rules.join('\n');
codiconStyleSheet.textContent = rules.join('\n');
}

const delayer = new RunOnceScheduler(updateAll, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -685,10 +685,10 @@ function _applyRules(styleSheetContent: string, rulesClassName: string) {
const elStyle = document.createElement('style');
elStyle.type = 'text/css';
elStyle.className = rulesClassName;
elStyle.innerHTML = styleSheetContent;
elStyle.textContent = styleSheetContent;
document.head.appendChild(elStyle);
} else {
(<HTMLStyleElement>themeStyles[0]).innerHTML = styleSheetContent;
(<HTMLStyleElement>themeStyles[0]).textContent = styleSheetContent;
}
}

Expand Down

0 comments on commit f0dd2d2

Please sign in to comment.