diff --git a/ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-config.resolver.ts b/ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-config.resolver.ts index 06519198c0..1ed605db97 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-config.resolver.ts +++ b/ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-config.resolver.ts @@ -37,9 +37,10 @@ import { InboxNotificationDialogComponent, InboxNotificationDialogData } from '@home/pages/notification/inbox/inbox-notification-dialog.component'; -import { Injectable } from '@angular/core'; +import { Injectable, SecurityContext } from '@angular/core'; import { ActivatedRouteSnapshot } from '@angular/router'; import { UtilsService } from '@core/services/utils.service'; +import { DomSanitizer } from '@angular/platform-browser'; @Injectable() export class InboxTableConfigResolver { @@ -50,7 +51,8 @@ export class InboxTableConfigResolver { private translate: TranslateService, private dialog: MatDialog, private datePipe: DatePipe, - private utilsService: UtilsService) { + private utilsService: UtilsService, + private sanitizer: DomSanitizer) { this.config.entityType = EntityType.NOTIFICATION; this.config.detailsPanelEnabled = false; @@ -95,14 +97,14 @@ export class InboxTableConfigResolver { new EntityTableColumn('type', 'notification.type', '10%', (notification) => this.translate.instant(NotificationTemplateTypeTranslateMap.get(notification.type).name)), new EntityTableColumn('subject', 'notification.subject', '30%', - (entity) => this.utilsService.customTranslation(entity.subject, entity.subject)), + (entity) => this.sanitizer.sanitize(SecurityContext.HTML, this.utilsService.customTranslation(entity.subject, entity.subject))), new EntityTableColumn('text', 'notification.message', '60%', - (entity) => this.utilsService.customTranslation(entity.text, entity.text)) + (entity) => this.sanitizer.sanitize(SecurityContext.HTML, this.utilsService.customTranslation(entity.text, entity.text))) ); } - resolve(route: ActivatedRouteSnapshot): EntityTableConfig { + resolve(_route: ActivatedRouteSnapshot): EntityTableConfig { return this.config; } @@ -128,7 +130,7 @@ export class InboxTableConfigResolver { }); } - private markAsRead($event, entity){ + private markAsRead($event: Event, entity){ if ($event) { $event.stopPropagation(); } diff --git a/ui-ngx/src/app/shared/components/notification/notification.component.html b/ui-ngx/src/app/shared/components/notification/notification.component.html index ec984b033d..db04d8df98 100644 --- a/ui-ngx/src/app/shared/components/notification/notification.component.html +++ b/ui-ngx/src/app/shared/components/notification/notification.component.html @@ -28,8 +28,8 @@
-
-
+
+