Closed Dev-questions closed 4 years ago
var sanitizer = new HtmlSanitizer(); sanitizer.AllowedSchemes.Add("data");
Above is allowing all data URIs, where i need to allow only data:image URI. I don't want to allow other once like dat:text/html etc. Is it possible to allow only data:image?
Yes, see https://github.com/mganss/HtmlSanitizer/issues/122#issuecomment-316666388 and examples at https://github.com/mganss/HtmlSanitizer/wiki/Hooks
var sanitizer = new HtmlSanitizer(); sanitizer.AllowedSchemes.Add("data");
Above is allowing all data URIs, where i need to allow only data:image URI. I don't want to allow other once like dat:text/html etc. Is it possible to allow only data:image?