-
Notifications
You must be signed in to change notification settings - Fork 565
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
Percent-encoded data URLs support added #457
Percent-encoded data URLs support added #457
Conversation
@moreau-afnic Are you sure URL starting with At least site https://base64.guru/tools/repair says that URL from your test is not valid: Can you provide a real example of valid URL starting with |
@asolntsev you seem to be confusing two different things. There are two standards : base64 and data URLs (which can be base64 data URLs). base64 is what comes after Any data URL (with or without base64 data) can have percent-encoded data. It's explained in the link posted when I opened the PR (https://developer.mozilla.org/en-US/docs/Web/URI/Schemes/data#syntax), which itself references the relevant RFC (RFC 3986). The tool you're using checks base64 validity not base64 data URL validity, so it won't work with any base64 data URL whether it contains percent-encoded data or not (because of the base64 data URL prefix). There is already an example of a base64 data URL with percent-encoded data in the unit test; if you copy/paste it into an HTML file, CSS file or even directly into the address bar of a browser, you will see that browsers accept this format as they should. |
@moreau-afnic No, I am not mixing. :) But now I found that
So the fix is correct. But I think we should even simplify it by removing |
About removing the |
Can you bring an example of valid unencoded data URL starting with |
In the unit test, the first The second |
Yes, sure. My bad, I didn't see this sample. @moreau-afnic Thank you for the patience. :) |
Data URLs used for embedded images and fonts can be percent-encoded, so some HTML/CSS build tools (such as Parcel) generate such data URLs, which are currently not supported by Flying Saucer.