We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
html tags are not striped (or better will be to htmlspecialchars() them)
htmlspecialchars()
Test string:
<script type="text/javascript">alert('XSS');</script> <style type="text/css">body { background: red; }</style>
Result: http://sourcebox.io/27978c3083f1bf93be8f9325d3a2a36b/markdown
Is there any option to enable safe html output? Or am I doing something wrong?
Github generates this html:
<p>body { background: red; }</p>
You can test that by executing this script in your browser console:
jQuery.post('/preview?text='+ encodeURIComponent('<script type="text/javascript">alert("XSS");</script><style type="text/css">body { background: red; }</style>'), function(html){ alert(html); });
Bitbucket.org generates this html:
<p><script type="text/javascript">alert('XSS');</script> <style type="text/css">body { background: red; }</style></p>
The text was updated successfully, but these errors were encountered:
A Markdown parser should accept HTML including scripts.
It is your responsibility to decide whether and how you would sanitize your input.
Sorry, something went wrong.
@hkdobrev ok thanks
@moldcraft see #161.
No branches or pull requests
html tags are not striped (or better will be to
htmlspecialchars()
them)Test string:
Result: http://sourcebox.io/27978c3083f1bf93be8f9325d3a2a36b/markdown
Is there any option to enable safe html output? Or am I doing something wrong?
Github generates this html:
You can test that by executing this script in your browser console:
Bitbucket.org generates this html:
The text was updated successfully, but these errors were encountered: