diff --git a/public/main/inc/lib/formvalidator/FormValidator.class.php b/public/main/inc/lib/formvalidator/FormValidator.class.php index 4570d43ebb5..94ad843301f 100644 --- a/public/main/inc/lib/formvalidator/FormValidator.class.php +++ b/public/main/inc/lib/formvalidator/FormValidator.class.php @@ -2,6 +2,8 @@ /* For licensing terms, see /license.txt */ +use Chamilo\CoreBundle\Component\HTMLPurifier\Filter\RemoveOnAttributes; + /** * Class FormValidator * create/manipulate/validate user input. diff --git a/src/CoreBundle/Component/HTMLPurifier/Filter/RemoveOnAttributes.php b/src/CoreBundle/Component/HTMLPurifier/Filter/RemoveOnAttributes.php new file mode 100644 index 00000000000..93589f4970b --- /dev/null +++ b/src/CoreBundle/Component/HTMLPurifier/Filter/RemoveOnAttributes.php @@ -0,0 +1,29 @@ +]+)/i'; + + return preg_replace($pattern, '', $html); + } +}