I've introduced two bugs in my implementation to support @media rules:
- AntiSamy throws a parsing exception on empty media queries:
@media {...}
- AntiSamy throws a parsing exception on custom media types, even if they are defined in the policy
Expected behaviour
AntiSamy should be able to parse the media rule @media {} as no defined media type implies the media type all.
When defining custom media types in the policy with the _mediatype css-rules property, these should not be filtered by AntiSamy.
Current behaviour
For both these cases AntiSamy throws an CSSParseException.
I've updated my example project with two corresponding tests:
https://github.com/jonah1und1/antisamy-media
Possible Solution
I have created a PR with a possible solution: #597.
Please feel free to comment and/or review.
I've introduced two bugs in my implementation to support
@mediarules:@media {...}Expected behaviour
AntiSamy should be able to parse the media rule
@media {}as no defined media type implies the media typeall.When defining custom media types in the policy with the
_mediatypecss-rules property, these should not be filtered by AntiSamy.Current behaviour
For both these cases AntiSamy throws an
CSSParseException.I've updated my example project with two corresponding tests:
https://github.com/jonah1und1/antisamy-media
Possible Solution
I have created a PR with a possible solution: #597.
Please feel free to comment and/or review.