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

Optimise the support for <script>, <style> and other similar non-html elements #3

Merged
merged 7 commits into from
Dec 13, 2023

Conversation

SYM01
Copy link
Owner

@SYM01 SYM01 commented Dec 13, 2023

Thinking about the following HTML

<body>
	<div>
	<h1>Example Domain</h1>
	<p><a href="https://www.iana.org/domains/example">More information...</a></p>
	</div>
	<script>alert(1)</script>
</body>

The expected output should be

	<div>
	<h1>Example Domain</h1>
	<p><a href="https://www.iana.org/domains/example">More information...</a></p>
	</div>
	

However, in the previous version, the output looks like

	<div>
	<h1>Example Domain</h1>
	<p><a href="https://www.iana.org/domains/example">More information...</a></p>
	</div>
	alert(1)

The output is unexpected. So we need to optimise the support for <script>, <style>.

Copy link

codecov bot commented Dec 13, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (1c78ca2) 95.16% compared to head (a2afdf9) 95.27%.
Report is 1 commits behind head on master.

Files Patch % Lines
dfa.go 96.34% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master       #3      +/-   ##
==========================================
+ Coverage   95.16%   95.27%   +0.10%     
==========================================
  Files           3        3              
  Lines         538      614      +76     
==========================================
+ Hits          512      585      +73     
- Misses         18       20       +2     
- Partials        8        9       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@SYM01 SYM01 merged commit 87a0f56 into master Dec 13, 2023
20 checks passed
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.

1 participant