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.
Description
Previously there was an issue where some HTML tags were removed instead of escaped, which led to confusing support ticket bodies (see ticket for more details). This was happening even though we have
sanitize-html
set to "escape".It looks like this was a bug in that library. Upgrading the library fixed the issue, with no regressions as far as I can tell.
Note to Reviewers
As a simple example, in production: entering
<input />
in the Support Ticket Reply box will yield an empty Preview tab. In this branch, you'll see<input />
in the Preview tab, properly escaped behind the scenes.Note: there is still some confusing behavior in the library which @acourdavault opened an issue about here: apostrophecms/sanitize-html#334. As an example,
<input>
yields<input />
(self-closed). This isn't ideal, but not a deal-breaker IMO.