2021-06-14 09:14:40 +02:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, lxml
|
|
|
|
, beautifulsoup4
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
2020-06-21 02:50:43 +02:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "html-sanitizer";
|
|
|
|
version = "1.9.1";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "matthiask";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0nnv34924r0yn01rwlk749j5ijy7yxyj302s1i57yjrkqr3zlvas";
|
|
|
|
};
|
|
|
|
|
2021-06-14 09:14:40 +02:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
lxml
|
|
|
|
beautifulsoup4
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [ "html_sanitizer/tests.py" ];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "html_sanitizer" ];
|
2020-06-21 02:50:43 +02:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-06-14 09:14:40 +02:00
|
|
|
description = "Allowlist-based and very opinionated HTML sanitizer";
|
2020-06-21 02:50:43 +02:00
|
|
|
homepage = "https://github.com/matthiask/html-sanitizer";
|
2021-06-14 09:14:40 +02:00
|
|
|
license = with licenses; [ bsd3 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
2020-06-21 02:50:43 +02:00
|
|
|
};
|
|
|
|
}
|