I have trouble while config HTML purifier that was installed from github used composer
below
$ composer require ezyang/htmlpurifier
next I called them from bootstrap.php
$this->addPlugin('ezyang/htmlpurifier');
and called them from src/Application.php
public function bootstrap()
{
parent::bootstrap();
$this->addPlugin('ezyang/htmlpurifier');
}
next I was try to config in method
below this
use Cake\Event\Event;
use ArrayObject;
public function beforeMarshal(Event $event, ArrayObject $data, ArrayObject $options)
{
foreach ($data as $key => $article) {
if(is_string($article)) {
$config = HTMLPurifier_Config::createDefault();
$purifier = new HTMLPurifier($config);
$clean_html = $purifier->purify($article);
$data[$key] = $clean_html;
}
}
}
but the shown error display below
Error: The application is trying to load a file from the ezyang/htmlpurifier plugin.
Make sure your plugin ezyang/htmlpurifier is in the C:\xampp\htdocs\klinikucing\plugins\ directory and was loaded.
<?php
// src/Application.php
public function bootstrap()
{
parent::bootstrap();
$this->addPlugin('ezyang/htmlpurifier');
}
How the way to make this plugin works, I hope someone help me, thanx