added sanitize for widget action name on delete
This commit is contained in:
parent
599ccdc43c
commit
33df79cd12
@ -24,6 +24,7 @@ import {
|
|||||||
NgZone,
|
NgZone,
|
||||||
OnDestroy,
|
OnDestroy,
|
||||||
OnInit,
|
OnInit,
|
||||||
|
SecurityContext,
|
||||||
ViewChild
|
ViewChild
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
|
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
|
||||||
@ -53,6 +54,7 @@ import {
|
|||||||
import { deepClone } from '@core/utils';
|
import { deepClone } from '@core/utils';
|
||||||
import { hidePageSizePixelValue } from '@shared/models/constants';
|
import { hidePageSizePixelValue } from '@shared/models/constants';
|
||||||
import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop';
|
import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop';
|
||||||
|
import { DomSanitizer } from '@angular/platform-browser';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'tb-manage-widget-actions',
|
selector: 'tb-manage-widget-actions',
|
||||||
@ -106,7 +108,8 @@ export class ManageWidgetActionsComponent extends PageComponent implements OnIni
|
|||||||
private dialogs: DialogService,
|
private dialogs: DialogService,
|
||||||
private cd: ChangeDetectorRef,
|
private cd: ChangeDetectorRef,
|
||||||
private elementRef: ElementRef,
|
private elementRef: ElementRef,
|
||||||
private zone: NgZone) {
|
private zone: NgZone,
|
||||||
|
private sanitizer: DomSanitizer) {
|
||||||
super();
|
super();
|
||||||
const sortOrder: SortOrder = { property: 'actionSourceName', direction: Direction.ASC };
|
const sortOrder: SortOrder = { property: 'actionSourceName', direction: Direction.ASC };
|
||||||
this.pageLink = new PageLink(10, 0, null, sortOrder);
|
this.pageLink = new PageLink(10, 0, null, sortOrder);
|
||||||
@ -289,7 +292,8 @@ export class ManageWidgetActionsComponent extends PageComponent implements OnIni
|
|||||||
}
|
}
|
||||||
const title = this.translate.instant('widget-config.delete-action-title');
|
const title = this.translate.instant('widget-config.delete-action-title');
|
||||||
const content = this.translate.instant('widget-config.delete-action-text', {actionName: action.name});
|
const content = this.translate.instant('widget-config.delete-action-text', {actionName: action.name});
|
||||||
this.dialogs.confirm(title, content,
|
const safeContent = this.sanitizer.sanitize(SecurityContext.HTML, content);
|
||||||
|
this.dialogs.confirm(title, safeContent,
|
||||||
this.translate.instant('action.no'),
|
this.translate.instant('action.no'),
|
||||||
this.translate.instant('action.yes'), true).subscribe(
|
this.translate.instant('action.yes'), true).subscribe(
|
||||||
(res) => {
|
(res) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user