Answer the question
In order to leave comments, you need to log in
How to disable span tag/allow only p tag via HtmlPurifier?
The text for the block on the site is filled through the admin panel, where it is possible to edit the text styles. In my case, I would like it not to be displayed. Now the text on the page looks like this:
<p>
<span style="font-size:24pt;"> текст </span>
</p>
<?php HtmlPurifier::process($text->getText(), function ($config) {
$config->getHTMLDefinition(true)->addAttribute('p', 'class', 'Text');
});?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question