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

fix: script element #4

Merged
merged 1 commit into from
Nov 18, 2020
Merged

fix: script element #4

merged 1 commit into from
Nov 18, 2020

Conversation

harttle
Copy link
Member

@harttle harttle commented Nov 18, 2020

- script 下内容不做 HTML 转义
- script 作为根的情况不输出 s-data 注释
- script fragment 不输出 s-frag 注释
@@ -0,0 +1 @@
<script>alert(1);alert(2)</script>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

目前的输出:

<script><!--s-data:{}-->alert(1);<!--s-frag-->alert(2)<!--/s-frag--></script>

@@ -0,0 +1 @@
<script>alert("hello")</script>
Copy link
Member Author

@harttle harttle Nov 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

目前的输出:

<script><!--s-data:{"msg":"hello"}-->alert(&quot;hello&quot;)</script>

@errorrik errorrik merged commit 06c313b into master Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants