提交 c112f845 编写于 作者: J Johannes Rieken

less innerHTML usage, eg. textContent for styles and innerText for labels

上级 5920e713
...@@ -95,7 +95,7 @@ export class CodeLensContribution implements IEditorContribution { ...@@ -95,7 +95,7 @@ export class CodeLensContribution implements IEditorContribution {
.monaco-editor .codelens-decoration.${this._styleClassName} { height: ${height}px; line-height: ${lineHeight}px; font-size: ${fontSize}px; padding-right: ${Math.round(fontInfo.fontSize * 0.45)}px;} .monaco-editor .codelens-decoration.${this._styleClassName} { height: ${height}px; line-height: ${lineHeight}px; font-size: ${fontSize}px; padding-right: ${Math.round(fontInfo.fontSize * 0.45)}px;}
.monaco-editor .codelens-decoration.${this._styleClassName} > a > .codicon { line-height: ${lineHeight}px; font-size: ${fontSize}px; } .monaco-editor .codelens-decoration.${this._styleClassName} > a > .codicon { line-height: ${lineHeight}px; font-size: ${fontSize}px; }
`; `;
this._styleElement.innerHTML = newStyle; this._styleElement.textContent = newStyle;
} }
private _localDispose(): void { private _localDispose(): void {
...@@ -470,5 +470,3 @@ registerEditorAction(class ShowLensesInCurrentLine extends EditorAction { ...@@ -470,5 +470,3 @@ registerEditorAction(class ShowLensesInCurrentLine extends EditorAction {
} }
} }
}); });
...@@ -167,7 +167,7 @@ class MessageWidget { ...@@ -167,7 +167,7 @@ class MessageWidget {
let relatedResource = document.createElement('a'); let relatedResource = document.createElement('a');
dom.addClass(relatedResource, 'filename'); dom.addClass(relatedResource, 'filename');
relatedResource.innerHTML = `${getBaseLabel(related.resource)}(${related.startLineNumber}, ${related.startColumn}): `; relatedResource.innerText = `${getBaseLabel(related.resource)}(${related.startLineNumber}, ${related.startColumn}): `;
relatedResource.title = getPathLabel(related.resource, undefined); relatedResource.title = getPathLabel(related.resource, undefined);
this._relatedDiagnostics.set(relatedResource, related); this._relatedDiagnostics.set(relatedResource, related);
......
...@@ -429,7 +429,7 @@ export class ReferenceWidget extends peekView.PeekViewWidget { ...@@ -429,7 +429,7 @@ export class ReferenceWidget extends peekView.PeekViewWidget {
if (this._model.isEmpty) { if (this._model.isEmpty) {
this.setTitle(''); this.setTitle('');
this._messageContainer.innerHTML = nls.localize('noResults', "No results"); this._messageContainer.innerText = nls.localize('noResults', "No results");
dom.show(this._messageContainer); dom.show(this._messageContainer);
return Promise.resolve(undefined); return Promise.resolve(undefined);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册