Skip to content

Commit

Permalink
Call OnFilteringUrl for relative URL (fixes #542)
Browse files Browse the repository at this point in the history
  • Loading branch information
mganss committed Apr 16, 2024
1 parent a87c71e commit 7d6fc5e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/HtmlSanitizer/HtmlSanitizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,12 @@ protected static string DecodeCss(string css)
{
try
{
return new Uri(baseUri, iri.Value).AbsoluteUri;
var sanitizedUrl = new Uri(baseUri, iri.Value).AbsoluteUri;
var ev = new FilterUrlEventArgs(element, url, sanitizedUrl);

OnFilteringUrl(ev);

return ev.SanitizedUrl;
}
catch (UriFormatException)
{
Expand Down

0 comments on commit 7d6fc5e

Please sign in to comment.