Merged
Conversation
sergeyteleshev
commented
Feb 27, 2024
Contributor
Author
|
tests are okay. I just changed the file name and job here went crazy cause it's left in |
devnaumov
reviewed
Feb 28, 2024
| * Licensed under the Apache License, Version 2.0. | ||
| * you may not use this file except in compliance with the License. | ||
| */ | ||
| export function toSafeHtmlString(dirty: string): string { |
Member
There was a problem hiding this comment.
Probably better to use lib like dompurify to sanitize html
Contributor
Author
There was a problem hiding this comment.
this was my first solution. @Wroud suggested to generate a html safe string
in this case we kill 2 rabbits:
- the code is not executable by browser
- the user will see that something illegal happened in his JSON tab editor and start investigation what happened
Wroud
approved these changes
Mar 4, 2024
devnaumov
approved these changes
Mar 5, 2024
sergeyteleshev
added a commit
that referenced
this pull request
Mar 6, 2024
* CB-4743 adds html sanitizer * CB-4743 adds license to sanitizeHtml * CB-4743 do not use sanitize to purify the json line data * CB-4743 fix: toSafeHtmlString test correct cases --------- Co-authored-by: s.teleshev <s.teleshev@mu.se> Co-authored-by: mr-anton-t <42037741+mr-anton-t@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


No description provided.