-
Notifications
You must be signed in to change notification settings - Fork 644
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
Fixes #322 - Autoescaping doesen't work in <script> tag context #324
Conversation
Functionally, everything looks good. However, the fact that you had to change the That said, it's no less secure (the user could still run arbitrary code) and I think this is how things should work. This change is less about security and more about making sure |
I wonder if this change would be better applied to Assuming it is in a string, We could take this farther and look for the full ending |
Your comments are correct @mlrawlings. This is more about fixing bad escaping since HTML entities within the |
Since we are only concerned within the text within the
I'm not quite sure what you mean here. |
To me, Where as I think the basic script injection is something that's pretty obvious, but the danger of a string that includes
Adding the functionality to The other thing I'm concerned about is I know that we don't want to bump to |
On second thought, let's merge it. |
This PR changes out the escape function that is used when generating code within the context of the
<script>
tag. The escape function used within the context of the<script>
tag will only escape'</'
to prevent an ending script tag.