use swal titletext to avoid XSS (#1828)

This commit is contained in:
Kyle Spearrin 2021-05-13 15:22:49 -04:00 committed by GitHub
parent 1ab2a3a4b5
commit c173217330
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -238,7 +238,7 @@ export class AppComponent implements OnInit {
iconHtml: iconClasses != null ? `<i class="swal-custom-icon fa ${iconClasses}"></i>` : 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'),

View File

@ -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: '<i class="swal-custom-icon fa fa-info-circle text-info"></i>',