jpuri / draftjs-to-html

Library for converting Draftjs editor content state to HTML
MIT License
321 stars 143 forks source link

Markdown to HTML XSS #47

Open itsDZhang opened 6 years ago

itsDZhang commented 6 years ago

If I do [some text](javascript:alert('xss')) in the editor, this will get rendered when i click on the link. The format above is in markdown

image

Therefore, this is quite vulnerable to attacks: https://github.com/showdownjs/showdown/wiki/Markdown%27s-XSS-Vulnerability-(and-how-to-mitigate-it)

Is there any way we can solve this?