fix: CSSTidy ImportantComments not handled properly#359
fix: CSSTidy ImportantComments not handled properly#359ezyang merged 4 commits intoezyang:masterfrom
Conversation
96a5fc2 to
b4d9fbe
Compare
Signed-off-by: Francis Lévesque <wolfrank2164@gmail.com>
b4d9fbe to
a9431ac
Compare
ezyang
left a comment
There was a problem hiding this comment.
You are bypassing validation of style entirely, therefore introducing a security vulnerability here. You must still validate style.
|
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 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 |
# [4.17.0](v4.16.0...v4.17.0) (2023-11-17) ### Bug Fixes * CSSTidy ImportantComments not handled properly ([#359](#359)) ([78a9b4d](78a9b4d)) * fix CI ([#361](#361)) ([9ec687c](9ec687c)) * Invalid scheme check in Attr.TargetBlank ([#363](#363)) ([0176ef4](0176ef4)) * semantic release ([#339](#339)) ([d82f3d9](d82f3d9)) * semantic release ([#341](#341)) ([e55fead](e55fead)), closes [#339](#339) * Support for locales using decimal separators other than . (dot) ([#372](#372)) ([43f49ac](43f49ac)) ### Features * Add support for all text-decoration properties ([#360](#360)) ([2d775c0](2d775c0)) * Allows commas to be included in tel URI ([#389](#389)) ([ec92490](ec92490)), closes [#388](#388) ### Reverts * Revert "fix: semantic release (#339)" (#340) ([3e83215](3e83215)), closes [#339](#339) [#340](#340)
|
🎉 This PR is included in version 4.17.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Fix for issue #357
Added a check if
$declsis an array before theforeachand not keeping the value if it's not.Also added a unit test for that case.