Skip to content
New issue

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

[Docs] Add warning about XSS #149

Open
wants to merge 2 commits into
base: gh-pages
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Prevent XSS testing in demo from causing infinite loops
I think it's best _not_ to try to prevent XSS within the demo so users can accurately
see the results _without_ any sanitization, but users should at least be able to test
things like <img src=x onerror=alert(1)> within the editor without causing infinite
loops. Triggering on keyup was causing the alert to be re-fired upon pressing Escape
to close it.
  • Loading branch information
lionel-rowe committed May 11, 2024
commit d5074dcdb427a7b12fe13f99735650a8e47eaaa0
4 changes: 1 addition & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,7 @@ <h1 id="demo" class="page-header">
<div class="row">
<div class="col-md-6">
<textarea
onkeydown="refresh();"
onkeyup="refresh();"
onchange="refresh();"
oninput="refresh();"
id="input"
style="width: 100%; height: 1000px;"
>
Expand Down