Open andreybatalof opened 2 years ago
Hello!
Let's check following code:
$allowedTagsList = [ 'a', 'p', 'div', ]; $config = HTMLPurifier_Config::createDefault(); $config->set('Core.EscapeInvalidTags', true); $config->set('HTML.AllowedElements', $allowedTagsList); $purifier = new HTMLPurifier($config); $htmlBody = $purifier->purify($htmlBody);
$htmlBody before purifying <p>Hello! I want attach following xml:</p><p><someGreatTag>someGreatValue</someGreatTag></p>
<p>Hello! I want attach following xml:</p><p><someGreatTag>someGreatValue</someGreatTag></p>
Expected after purifying <p>Hello! I want attach following xml:</p><p><someGreatTag>someGreatValue</someGreatTag></p>
<p>Hello! I want attach following xml:</p><p><someGreatTag>someGreatValue</someGreatTag></p>
But in reality <p>Hello! I want attach following xml:</p><p><somegreattag>someGreatValue</somegreattag></p>
<p>Hello! I want attach following xml:</p><p><somegreattag>someGreatValue</somegreattag></p>
So, any denied tag lose capitalization (someGreatTag -> somegreattag)
someGreatTag
somegreattag
php 7.4.27 htmlpurifier 4.14.0
Hello!
Let's check following code:
$htmlBody before purifying
<p>Hello! I want attach following xml:</p><p><someGreatTag>someGreatValue</someGreatTag></p>
Expected after purifying
<p>Hello! I want attach following xml:</p><p><someGreatTag>someGreatValue</someGreatTag></p>
But in reality
<p>Hello! I want attach following xml:</p><p><somegreattag>someGreatValue</somegreattag></p>
So, any denied tag lose capitalization (
someGreatTag
->somegreattag
)php 7.4.27 htmlpurifier 4.14.0