sanitize_html 2.0.0 copy "sanitize_html: ^2.0.0" to clipboard
sanitize_html: ^2.0.0 copied to clipboard

Function for sanitizing HTML to prevent XSS by restrict elements and attributes to a safe subset of allowed values.

v2.0.0 #

  • Migrate to null safety.

v1.4.1 #

  • Make addLinkRel optional. Issue.

v1.4.0 #

v1.3.0 #

  • Only print self-closing tags for void-elements. This could cause <strong /> in HTML documents, which is can be interpreted as an opening tag by HTML5 parsers, causing the HTML structure to break.

v1.2.0 #

  • Does not depend on universal_html, uses custom HTML rendering for the output.
  • Allowed classes are kept, even if there are non-allowed classes present on the same element.

v1.1.0 #

  • Add options allowElementId and allowClassName to allow specific element ids and class names.

v1.0.0 #

  • Initial release.
46
likes
160
points
502k
downloads

Publisher

verified publishergoogle.dev

Weekly Downloads

Function for sanitizing HTML to prevent XSS by restrict elements and attributes to a safe subset of allowed values.

Homepage
Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

html, meta

More

Packages that depend on sanitize_html