Closed vanni-giachin closed 2 months ago
According to the documentation the FilterUrl event should be raised every time a URL is sanitized:
Occurs when a URL is being sanitized
However if the URL to sanitize is relative, and a baseUrl is used as sanitization parameter, the URL filters are not invoked.
See code line: https://github.com/mganss/HtmlSanitizer/blob/v8.0.843/src/HtmlSanitizer/HtmlSanitizer.cs#L856
There is a return statement before OnFilteringUrl is invoked: return new Uri(baseUri, iri.Value).AbsoluteUri;
return new Uri(baseUri, iri.Value).AbsoluteUri;
Great catch, thank you!
According to the documentation the FilterUrl event should be raised every time a URL is sanitized:
However if the URL to sanitize is relative, and a baseUrl is used as sanitization parameter, the URL filters are not invoked.
See code line: https://github.com/mganss/HtmlSanitizer/blob/v8.0.843/src/HtmlSanitizer/HtmlSanitizer.cs#L856
There is a return statement before OnFilteringUrl is invoked:
return new Uri(baseUri, iri.Value).AbsoluteUri;