From 549a3aec799a2275e057607e00b4f6de5deac689 Mon Sep 17 00:00:00 2001 From: Edwin Anciani Date: Tue, 30 Jan 2024 09:55:01 -0600 Subject: [PATCH] FIO-7839: Fixing Sanitize before interpolate --- src/components/html/HTML.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/html/HTML.js b/src/components/html/HTML.js index 16653f32ea..0e0d3cf56f 100644 --- a/src/components/html/HTML.js +++ b/src/components/html/HTML.js @@ -45,14 +45,15 @@ export default class HTMLComponent extends Component { } const submission = _.get(this.root, 'submission', {}); - const content = this.component.content ? this.interpolate( - this.sanitize(this.component.content, this.shouldSanitizeValue), + const content = this.sanitize(this.component.content ? this.interpolate( + this.component.content, { metadata: submission.metadata || {}, submission: submission, data: this.rootValue, row: this.data - }) : ''; + }) : '', + this.shouldSanitizeValue); return content; }