github microcosm-cc/bluemonday v1.0.11
Improve support for links on all elements

latest releases: v1.0.27, v1.0.26, v1.0.25...
3 years ago

Originally I had only concentrated the link validation on the elements that were safe to link. However people do want to allow some unsafe elements and yet still have the benefits of link validation and sanitization, i.e. allow iframe but still have the src safely validated... these changes allow that.

Additionally I have added tests showing how AllowSchemesWithCustomPolicy can be used to globally allow only links to certain domains, and a test that shows how to apply the AllowAttributes().Matching().OnElements to only allow a given domain on specific elements (i.e. only allow an iframe if is is a YouTube embed).

Don't miss a new bluemonday release

NewReleases is sending notifications on new releases.