use swal titletext to avoid XSS (#966)

This commit is contained in:
Kyle Spearrin 2021-05-13 10:08:16 -04:00 committed by GitHub
parent a8d614628a
commit d9322c1307
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -132,7 +132,7 @@ export class ImportComponent implements OnInit {
inputAttributes: {
'readonly': 'true',
},
title: this.i18nService.t('importError'),
titleText: this.i18nService.t('importError'),
text: this.i18nService.t('importErrorDesc'),
showConfirmButton: true,
confirmButtonText: this.i18nService.t('ok'),

View File

@ -203,7 +203,7 @@ export class WebPlatformUtilsService implements PlatformUtilsService {
iconHtml: iconHtmlStr,
text: bodyIsHtml ? null : body,
html: bodyIsHtml ? body : null,
title: title,
titleText: title,
showCancelButton: (cancelText != null),
cancelButtonText: cancelText,
showConfirmButton: true,
@ -217,7 +217,7 @@ export class WebPlatformUtilsService implements PlatformUtilsService {
Promise<boolean> {
const result = await Swal.fire({
heightAuto: false,
title: title,
titleText: title,
input: 'password',
text: body,
confirmButtonText: this.i18nService.t('ok'),