
PHP
- 3 ответа
- 0 вопросов
5
Вклад в тег
$config = HTMLPurifier_Config::createDefault();
$config->set('HTML.Allowed', 'p[style],span[style],em,b,strong,img[src],img[width],img[height]');
$sanitiser = new HTMLPurifier($config);
$text = $sanitiser->purify(filter_input(INPUT_POST, 'text'));