Closed Wolfrank1149 closed 1 year ago
The validation is still done, I only skip it for the important comments. Do want me to also check them? If yes, do I validate them like a style or do you have a specifict validation for comments?
Hmm, ok, so basically it sounds like what you are saying is the decls are string, they are comments? I think I would still feel more comfortable if we limit the valid contents of the comment. Can we allow only !important for your use case?
Here the out put from print_r($this-_tidy->css)
in ExtractStyleBlocks.php
when I run the unit test I added.
(
[!] => ! Important
! Important2
[41] => Array
(
[div] => Array
(
[text-align] => right
)
)
)
I also decided to simply remove the comments since they have no impact on the code. It's safer and easier to manage.
Woops our ci is broken
:tada: This PR is included in version 4.17.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Fix for issue https://github.com/ezyang/htmlpurifier/issues/357
Added a check if
$decls
is an array before theforeach
and not keeping the value if it's not.Also added a unit test for that case.