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

Include html Tag in FilterUrlEventArgs #286

Merged
merged 1 commit into from
Jun 12, 2021
Merged

Include html Tag in FilterUrlEventArgs #286

merged 1 commit into from
Jun 12, 2021

Conversation

The-Nutty
Copy link
Contributor

For our use case we would like to be able to selectively sanitize data URI's based on the tag they are in (allow in an img tag, disallow any where else).

So to enable this I have modified the FilterUrlEventArgs to include the html tag that the URL is being sanitized from allowing us to include this logic in the FilterUrl call back.

Any comments or other way of achieving our goal appreciated.

@codecov
Copy link

codecov bot commented Jun 11, 2021

Codecov Report

Merging #286 (5994589) into master (918dba9) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #286      +/-   ##
==========================================
+ Coverage   93.40%   93.42%   +0.01%     
==========================================
  Files           4        4              
  Lines         682      684       +2     
  Branches       82       82              
==========================================
+ Hits          637      639       +2     
  Misses         34       34              
  Partials       11       11              
Impacted Files Coverage Δ
src/HtmlSanitizer/EventArgs.cs 100.00% <100.00%> (ø)
src/HtmlSanitizer/HtmlSanitizer.cs 95.43% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 918dba9...5994589. Read the comment docs.

@mganss mganss merged commit 1985595 into mganss:master Jun 12, 2021
@mganss
Copy link
Owner

mganss commented Jun 12, 2021

Thanks

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