formio / formio.js

JavaScript powered Forms with JSON Form Builder
https://formio.github.io/formio.js
MIT License
1.87k stars 1.06k forks source link

FIO-8395: html in error message not evaluating #5632

Closed ZenMasterJacob20011 closed 3 months ago

ZenMasterJacob20011 commented 3 months ago

Link to Jira Ticket

https://formio.atlassian.net/browse/FIO-8395

Description

What changed?

Previously, formio.js would remove the html tags from error messages. This PR replaces this behavior by removing the code that causes the removal of the html tags. This PR also updates the unescapeHTML function in utils to stop removing the html tags from the string. This PR also adds a new removeHTML function that removes html from a string. I added this to replace areas of the code that used unescapeHTML because the actual functionality that is needed is to remove html not unescape characters.

Why have you chosen this solution?

I choose this solution because it allows for other areas of the code to now utilize unescapeHTML without the unexpected behavior of removing html tags.

Dependencies

N/A

How has this PR been tested?

Manually tested and added tests

Checklist: