FIO-8395: html in error message not evaluating #5632
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: