-
Notifications
You must be signed in to change notification settings - Fork 330
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
Corrupted data URL output from <rect style='fill:%23000000;' width='100%' height='100%'/> #795
Comments
I'm not sure if it is the only problem, but you need to escape the spaces and % characters in your data url. |
It's a user submitted one based on browser support. It may not be correct, but this does not explain the result as far as I can tell reading the URL standard. |
Spaces are not the issue here. The problem can be reproduced with the following even simpler example:
Which outputs:
So the According to the URL standard: https://url.spec.whatwg.org/#percent-encoded-bytes
Here for |
The problem comes from the When a Lines 268 to 272 in 359bc90
But Lines 278 to 286 in 359bc90
Therefore when at the end, bytes from Lines 300 to 302 in 359bc90
we write again all accumulated characters, which duplicates all non-special characters accumulated. I believe that
An alternative would be to update it in the PS: Maybe some code could be common with |
When writing accumulated "non-special" characters, `slice_start` must be updated as some later conditionals/patter matches don't update it like the case when `%` is not followed by 2 hex digits. This fixes servo#795
When writing accumulated "non-special" characters, `slice_start` must be updated as some later conditionals/pattern matches don't update it like the case when `%` is not followed by 2 hex digits. This fixes servo#795
When writing accumulated "non-special" characters, `slice_start` must be updated as some later conditionals/pattern matches don't update it like the case when `%` is not followed by 2 hex digits. This fixes servo#795
When writing accumulated "non-special" characters, `slice_start` must be updated as some later conditionals/pattern matches don't update it like the case when `%` is not followed by 2 hex digits. This fixes servo#795
When writing accumulated "non-special" characters, `slice_start` must be updated as some later conditionals/pattern matches don't update it like the case when `%` is not followed by 2 hex digits. This fixes servo#795
When writing accumulated "non-special" characters, `slice_start` must be updated as some later conditionals/pattern matches don't update it like the case when `%` is not followed by 2 hex digits. This fixes servo#795
When writing accumulated "non-special" characters, `slice_start` must be updated as some later conditionals/pattern matches don't update it like the case when `%` is not followed by 2 hex digits. This fixes servo#795
When writing accumulated "non-special" characters, `slice_start` must be updated as some later conditionals/pattern matches don't update it like the case when `%` is not followed by 2 hex digits. This fixes servo#795
Version:
data-url 0.2.0 & master
Description
The following data URL:
produces a corrupted result with duplicate fields and unexpected values with
DataUrl::process
:Note that the data URL produces a full window black rectangle on Firefox and keeps the initial SVG intact.
SSCCE
The text was updated successfully, but these errors were encountered: