@@ -25990,3 +25990,26 @@ is the cythonized version of @code{fractions.Fraction}.")
"@code{pathvalidate} is a Python library to sanitize/validate strings
representing paths or filenames.")
(license license:expat)))
+
+(define-public python-html-sanitizer
+ (package
+ (name "python-html-sanitizer")
+ (version "1.9.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "html-sanitizer" version))
+ (sha256
+ (base32 "1mb9d80mar5y4ariqbmrxn5llcffh5qp3s3ywd05bxgg7jzaxh0k"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-lxml" ,python-lxml)
+ ("python-beautifulsoup4" ,python-beautifulsoup4)))
+ (home-page "https://github.com/matthiask/html-sanitizer")
+ (synopsis "Python library to sanitize HTML")
+ (description "This is a allowlist-based and very opinionated HTML sanitizer
+that can be used both for untrusted and trusted sources. It attempts to clean
+up the mess made by various rich text editors and or copy-pasting to make
+styling of webpages simpler and more consistent. It builds on the excellent
+HTML cleaner in lxml to make the result both valid and safe.")
+ (license license:bsd-3)))