RockFluid.MarkupSanity 1.0.1

Uses HtmlAgilityPack parser to protect against cross-site scripting by sanitizing html text against unrecognized tags and attributes.

HTML is matched against defined whitelisted tags and attributes to ensure only known safe markups are allowed.

Basic usage:
String inputValue = "<a onclick="javascript:alert('Gotcha!');" href="javascript:alert('Gotcha again!');">Click Me</a>";
String cleanValue = inputValue.SanitizeHtml();

More information is available in the project site's wiki.

What's New?
- Added a comprehensive list of default whitelisted tags and attributes.

There is a newer version of this package available.
See the version list below for details.
Install-Package RockFluid.MarkupSanity -Version 1.0.1
dotnet add package RockFluid.MarkupSanity --version 1.0.1
<PackageReference Include="RockFluid.MarkupSanity" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RockFluid.MarkupSanity --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

Added comprehensive list of default whitelists for tags and attributes.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.4.0 286 1/6/2019
1.3.1 291 10/23/2018
1.2.0 235 10/22/2018
1.1.0 417 2/10/2018
1.0.1 404 1/23/2018
1.0.0 367 1/7/2018