diff --git a/src/sql/base/browser/ui/modal/dialogHelper.ts b/src/sql/base/browser/ui/modal/dialogHelper.ts index fa4b5bf4fc..225b03a61c 100644 --- a/src/sql/base/browser/ui/modal/dialogHelper.ts +++ b/src/sql/base/browser/ui/modal/dialogHelper.ts @@ -17,7 +17,7 @@ export function appendRow(container: Builder, label: string, labelClass: string, container.element('tr', {}, (rowContainer) => { rowContainer.element('td', { class: labelClass }, (labelCellContainer) => { labelCellContainer.div({}, (labelContainer) => { - labelContainer.innerHtml(label); + labelContainer.text(label); }); }); rowContainer.element('td', { class: cellContainerClass }, (inputCellContainer) => { diff --git a/src/sql/base/browser/ui/modal/modal.ts b/src/sql/base/browser/ui/modal/modal.ts index 489b839eeb..f05c7bf2d1 100644 --- a/src/sql/base/browser/ui/modal/modal.ts +++ b/src/sql/base/browser/ui/modal/modal.ts @@ -170,7 +170,7 @@ export abstract class Modal extends Disposable implements IThemable { } modalHeader.div({ class: 'modal-title' }, (modalTitle) => { this._modalTitle = modalTitle; - modalTitle.innerHtml(this._title); + modalTitle.text(this._title); }); }); parts.push(this._modalHeaderSection.getHTMLElement()); @@ -433,7 +433,7 @@ export abstract class Modal extends Disposable implements IThemable { */ protected set title(title: string) { if (this._title !== undefined) { - this._modalTitle.innerHtml(title); + this._modalTitle.text(title); } } diff --git a/src/sql/parts/accountManagement/accountDialog/accountDialog.ts b/src/sql/parts/accountManagement/accountDialog/accountDialog.ts index 7e05d56dff..fc3c2c3935 100644 --- a/src/sql/parts/accountManagement/accountDialog/accountDialog.ts +++ b/src/sql/parts/accountManagement/accountDialog/accountDialog.ts @@ -131,7 +131,7 @@ export class AccountDialog extends Modal { this._noaccountViewContainer = DOM.$('div.no-account-view'); let noAccountTitle = DOM.append(this._noaccountViewContainer, DOM.$('.no-account-view-label')); let noAccountLabel = localize('accountDialog.noAccountLabel', 'There is no linked account. Please add an account.'); - noAccountTitle.innerHTML = noAccountLabel; + noAccountTitle.innerText = noAccountLabel; // Show the add account button for the first provider // Todo: If we have more than 1 provider, need to show all add account buttons for all providers diff --git a/src/sql/parts/connection/connectionDialog/connectionDialogService.ts b/src/sql/parts/connection/connectionDialog/connectionDialogService.ts index f547dd8942..01796c2fd8 100644 --- a/src/sql/parts/connection/connectionDialog/connectionDialogService.ts +++ b/src/sql/parts/connection/connectionDialog/connectionDialogService.ts @@ -339,9 +339,9 @@ export class ConnectionDialogService implements IConnectionDialogService { if (!platform.isWindows && types.isString(message) && message.toLowerCase().includes('kerberos') && message.toLowerCase().includes('kinit')) { message = [ localize('kerberosErrorStart', "Connection failed due to Kerberos error."), - localize('kerberosHelpLink', " Help configuring Kerberos is available at ") + helpLink, - localize('kerberosKinit', " If you have previously connected you may need to re-run kinit.") - ].join('
'); + localize('kerberosHelpLink', "Help configuring Kerberos is available at {0}", helpLink), + localize('kerberosKinit', "If you have previously connected you may need to re-run kinit.") + ].join('\r\n'); actions.push(new Action('Kinit', 'Run kinit', null, true, () => { this._connectionDialog.close(); this._clipboardService.writeText('kinit\r'); diff --git a/src/sql/parts/dashboard/containers/dashboardErrorContainer.component.ts b/src/sql/parts/dashboard/containers/dashboardErrorContainer.component.ts index 898214a4dd..07eb712b30 100644 --- a/src/sql/parts/dashboard/containers/dashboardErrorContainer.component.ts +++ b/src/sql/parts/dashboard/containers/dashboardErrorContainer.component.ts @@ -40,7 +40,7 @@ export class DashboardErrorContainer extends DashboardTab implements AfterViewIn ngAfterViewInit() { let errorMessage = this._errorMessageContainer.nativeElement as HTMLElement; - errorMessage.innerHTML = nls.localize('dashboardNavSection_loadTabError', 'The "{0}" section has invalid content. Please contact extension owner.', this.tab.title); + errorMessage.innerText = nls.localize('dashboardNavSection_loadTabError', 'The "{0}" section has invalid content. Please contact extension owner.', this.tab.title); } public get id(): string { diff --git a/src/sql/workbench/errorMessageDialog/errorMessageDialog.ts b/src/sql/workbench/errorMessageDialog/errorMessageDialog.ts index db7bf4f8ce..05b4addee8 100644 --- a/src/sql/workbench/errorMessageDialog/errorMessageDialog.ts +++ b/src/sql/workbench/errorMessageDialog/errorMessageDialog.ts @@ -101,7 +101,7 @@ export class ErrorMessageDialog extends Modal { private updateDialogBody(): void { let builder = new Builder(this._body).empty(); builder.div({ class: 'error-message' }, (errorContainer) => { - errorContainer.innerHtml(this._message); + errorContainer.getHTMLElement().innerText = this._message; }); } @@ -168,7 +168,7 @@ export class ErrorMessageDialog extends Modal { private resetActions(): void { this._actions = []; - for(let actionButton of this._actionButtons) { + for (let actionButton of this._actionButtons) { actionButton.element.style.visibility = 'hidden'; } }