use swal titletext to avoid XSS (#966)
This commit is contained in:
parent
a8d614628a
commit
d9322c1307
|
@ -132,7 +132,7 @@ export class ImportComponent implements OnInit {
|
||||||
inputAttributes: {
|
inputAttributes: {
|
||||||
'readonly': 'true',
|
'readonly': 'true',
|
||||||
},
|
},
|
||||||
title: this.i18nService.t('importError'),
|
titleText: this.i18nService.t('importError'),
|
||||||
text: this.i18nService.t('importErrorDesc'),
|
text: this.i18nService.t('importErrorDesc'),
|
||||||
showConfirmButton: true,
|
showConfirmButton: true,
|
||||||
confirmButtonText: this.i18nService.t('ok'),
|
confirmButtonText: this.i18nService.t('ok'),
|
||||||
|
|
|
@ -203,7 +203,7 @@ export class WebPlatformUtilsService implements PlatformUtilsService {
|
||||||
iconHtml: iconHtmlStr,
|
iconHtml: iconHtmlStr,
|
||||||
text: bodyIsHtml ? null : body,
|
text: bodyIsHtml ? null : body,
|
||||||
html: bodyIsHtml ? body : null,
|
html: bodyIsHtml ? body : null,
|
||||||
title: title,
|
titleText: title,
|
||||||
showCancelButton: (cancelText != null),
|
showCancelButton: (cancelText != null),
|
||||||
cancelButtonText: cancelText,
|
cancelButtonText: cancelText,
|
||||||
showConfirmButton: true,
|
showConfirmButton: true,
|
||||||
|
@ -217,7 +217,7 @@ export class WebPlatformUtilsService implements PlatformUtilsService {
|
||||||
Promise<boolean> {
|
Promise<boolean> {
|
||||||
const result = await Swal.fire({
|
const result = await Swal.fire({
|
||||||
heightAuto: false,
|
heightAuto: false,
|
||||||
title: title,
|
titleText: title,
|
||||||
input: 'password',
|
input: 'password',
|
||||||
text: body,
|
text: body,
|
||||||
confirmButtonText: this.i18nService.t('ok'),
|
confirmButtonText: this.i18nService.t('ok'),
|
||||||
|
|
Loading…
Reference in New Issue