Topic: Data attributes with two dashes in htmlawed
Hello,
if I am not doing something completely wrong, I believe I have found a bug in the htmlawed library related to the 'deny_attributes' configuration option.
I want to use a "allow-list", so I disallow everything and only want to allow specific attributes. One of the attributes that I want to allow is a data attribute that contains two dashes, so for example I use the following: 'deny_attribute' => '* -data-a-b'. However, the "data-a-b" attribute will still be filtered out (tested it on my page and on http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed/htmLawedTest.php).
If I use data attributes that contain only one dash (e.g. data-ab instead of data-a-b), everything works as expected.
Thanks in advance for your response.
Best regards,
nb