-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Embed style sheets after opening embedStyleSheets
should not be deleted all.
#108
Comments
@spassarop - Can you review. I have no background on this. |
Apparently the The only difference is that by policy you can parse imported stylesheets or not, and that is when the |
Ok, so I checked this by debugging. Many things to note:
I'll make a PR that everyone can review and make any suggestions. |
Enable
|
Hi,@spassarop |
You're right, I mentioned before that AntiSamy adds the imported style after. It first parses all styles, gathers URLs in the process, requests each style and parses it adding to the previous result. We should see if it can be done easily or if parsing results cannot be rearranged by design. However, this is a different issue, the original one was that import was not working at all. @davewichers, you think we should close+merge this here an open a new issue for that? |
Whatever you prefer. I don't care either way. |
Let's open a new one then. |
@LiuXing-R go check #113, it's OK to me from what I've tested. |
@spassarop @davewichers |
@ashishkataria86 I don't see how importing a remote stylesheet would work differently. The media rule still seems to not be working on the CSS parser dependency (you may have already read the explanation here) which is a pity. Unless until a big refactor is made by changing the 3rd party CSS parser or the current one gets updated by its maintainer. |
Set'embedStyleSheets' in the configuration:
Input:
Out:
Result: All embedded styles are deleted。
antisamy/src/main/java/org/owasp/validator/css/ExternalCssScanner.java
Lines 71 to 72 in 9733b9f
I found that the parseImportedStylesheets method signature cannot override the parseImportedStylesheets method of the parent class and will never be called. This seems to be a bug.
Hi, @davewichers @spassarop Is this check deprecated?
The text was updated successfully, but these errors were encountered: