Commit 3bb001db authored by Bas Couwenberg's avatar Bas Couwenberg

Drop php-htmlpurifier build dependency & test.

parent 67286b4e
......@@ -6,6 +6,7 @@ icingaweb2 (2.5.3-1~exp2) UNRELEASED; urgency=medium
* Drop obsolete README.source.
* Drop unused dependencies from icingaweb2 package.
* Include migrate module in icingaweb2-common.
* Drop php-htmlpurifier build dependency & test.
-- Bas Couwenberg <sebastic@debian.org> Sun, 06 May 2018 18:33:06 +0200
......
......@@ -6,7 +6,6 @@ Priority: optional
Build-Depends: bash-completion,
debhelper (>= 9),
php-cli,
php-htmlpurifier (>= 4.3),
node-uglify (>= 2) | yui-compressor,
node-source-map | yui-compressor
Standards-Version: 4.1.4
......
......@@ -12,13 +12,6 @@ override_dh_auto_build:
dh_auto_build
cd debian/uglify && $(MAKE) all
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
dh_auto_test
# test if php-htmlpurifier can be loaded
php debian/test/php-htmlpurifier.php
endif
override_dh_install:
dh_install -X.min.js -X.min.map -XSOURCE --list-missing
cp -r debian/uglify/*.min.* debian/icingaweb2/usr/share/icingaweb2/public/js/vendor/
......
<?php
require_once 'HTMLPurifier/Bootstrap.php';
require_once 'HTMLPurifier.php';
require_once 'HTMLPurifier.autoload.php';
$config = HTMLPurifier_Config::createDefault();
$config->set('Core.EscapeNonASCIICharacters', true);
$config->set('HTML.Allowed', 'p,br,b,a[href],i,table,tr,td[colspan],div[class]');
if (assert(get_class($config) == 'HTMLPurifier_Config') === true) {
echo "HTMLPurifier loaded successfully.\n";
}
else {
exit(1);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment