htmlpurifier icon indicating copy to clipboard operation
htmlpurifier copied to clipboard

Check if element without attribute is allowed

Open kesselb opened this issue 4 years ago • 1 comments

Fix #299

Note: My knowledge about css parsing is limited. I'm not sure if that's a proper fix :see_no_evil:

kesselb avatar Aug 10 '21 16:08 kesselb

Hi,

I also experienced that bug 2 years ago or so, and I quickly fixed it by changing line 243 to this:

if ($y === '*' || strpos($y, '[') !== false || isset($html_definition->info[$y = strtolower($y)])) {

Which means I introduced this check: || strpos($y, '[') !== false

It works very good since then 😃 But I would prefer to have a 100% correct solution upstream of cause 👍

PHPGangsta avatar Oct 27 '21 19:10 PHPGangsta