-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Escape raw html tag in markdown by default (#3399)
# Motivation Escape raw html tags in markdown content to increase the security. > Disadvantage is that the SVGs inside the markdown code block will be also escaped and rendered with `<` instead of `<`. # Changes - add optional `escapeRawHtmlTags` to `markdownToHTML` function # Tests - htmlRenderer # Todos - [x] Add entry to changelog (if necessary). # Screenshots There is a raw html in the [provided sample](https://dashboard.internetcomputer.org/proposal/104084): ## before <img width="825" alt="Screenshot 2023-09-27 at 15 20 21" src="https://github.com/dfinity/nns-dapp/assets/98811342/6e925de2-904a-42ca-a8ba-105a181dae9a"> ## after | NNS-DAPP | Dashboard | |--------|--------| | <img width="544" alt="image" src="https://github.com/dfinity/nns-dapp/assets/98811342/3a92ef4d-ff71-4c69-8be9-e689bb8853bf"> | <img width="694" alt="image" src="https://github.com/dfinity/nns-dapp/assets/98811342/fd02cd9b-ebe2-4d43-b420-c8344814e5b8"> |
- Loading branch information
1 parent
71b4fb8
commit cc743f5
Showing
3 changed files
with
82 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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