Skip to content

Commit 3fc498d

Browse files
authored
Merge pull request #42 from abhishekdixitadobe/master
fix the instruction tab issue. HTML tags were appearing in instruction label.
2 parents a0c9316 + a3dbdf8 commit 3fc498d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

static/js/DynamicForm.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,13 @@ class DynamicForm {
256256
// Create element
257257
var instruction_label = document.createElement('h3');
258258

259-
// Assign properties
260-
instruction_label.innerHTML = msg;
259+
if (window.DOMParser) {
260+
var parser = new DOMParser();
261+
var doc = parser.parseFromString(msg, 'text/html');
262+
instruction_label.innerHTML = doc.body.textContent;
263+
} else{
264+
instruction_label.innerHTML = msg;
265+
}
261266
instruction_label.className = 'recipient_label';
262267

263268
// Append to parent

0 commit comments

Comments
 (0)