From c1732173305049e2b512cf928cdeee94fc9053e2 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 13 May 2021 15:22:49 -0400 Subject: [PATCH] use swal titletext to avoid XSS (#1828) --- src/popup/app.component.ts | 4 ++-- src/popup/settings/settings.component.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/popup/app.component.ts b/src/popup/app.component.ts index 5f42fa5a8c6..6bdda290f5b 100644 --- a/src/popup/app.component.ts +++ b/src/popup/app.component.ts @@ -238,7 +238,7 @@ export class AppComponent implements OnInit { iconHtml: iconClasses != null ? `` : undefined, text: msg.text, html: msg.html, - title: msg.title, + titleText: msg.title, showCancelButton: (cancelText != null), cancelButtonText: cancelText, showConfirmButton: true, @@ -256,7 +256,7 @@ export class AppComponent implements OnInit { const platformUtils = this.platformUtilsService as BrowserPlatformUtilsService; const result = await Swal.fire({ heightAuto: false, - title: msg.title, + titleText: msg.title, input: 'password', text: msg.body, confirmButtonText: this.i18nService.t('ok'), diff --git a/src/popup/settings/settings.component.ts b/src/popup/settings/settings.component.ts index 298838e8901..309df149398 100644 --- a/src/popup/settings/settings.component.ts +++ b/src/popup/settings/settings.component.ts @@ -239,7 +239,7 @@ export class SettingsComponent implements OnInit { const submitted = Swal.fire({ heightAuto: false, buttonsStyling: false, - title: this.i18nService.t('awaitDesktop'), + titleText: this.i18nService.t('awaitDesktop'), text: this.i18nService.t('awaitDesktopDesc'), icon: 'info', iconHtml: '',