Skip to content

Commit

Permalink
fix(core): Sanitize confirmation modal body (#7407)
Browse files Browse the repository at this point in the history
  • Loading branch information
alanmquach authored and Erik Munson committed Sep 18, 2019
1 parent f8267a4 commit 68cc18f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { module } from 'angular';
import * as DOMPurify from 'dompurify';
import { IModalService, IModalSettings } from 'angular-ui-bootstrap';

export interface IConfirmationModalParams {
Expand Down Expand Up @@ -38,7 +39,7 @@ export class ConfirmationModalService {
const extendedParams: IConfirmationModalParams = { ...this.defaults, ...params };

if (extendedParams.body) {
extendedParams.body = this.$sce.trustAsHtml(extendedParams.body);
extendedParams.body = this.$sce.trustAsHtml(DOMPurify.sanitize(extendedParams.body));
}

const modalArgs: IModalSettings = {
Expand Down

0 comments on commit 68cc18f

Please sign in to comment.