Skip to content
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

fix: incorrect data URL parsing #596

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

kiwiyou
Copy link

@kiwiyou kiwiyou commented Feb 29, 2024

Fixes #597 with correct regex.

Data URL Specification

Copy link

vercel bot commented Feb 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
satori-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 11, 2024 9:30pm

@kiwiyou kiwiyou changed the title Fix nested svg URI fix: nested svg Feb 29, 2024
@steven-tey
Copy link

Just tested this out, doesn't seem to work: playground link

CleanShot 2024-03-05 at 18 46 00@2x

@kiwiyou kiwiyou changed the title fix: nested svg fix: incorrect data URI parsing Mar 5, 2024
@kiwiyou kiwiyou changed the title fix: incorrect data URI parsing fix: incorrect data URL parsing Mar 5, 2024
@kiwiyou
Copy link
Author

kiwiyou commented Mar 5, 2024

@steven-tey Thank you for your report. I found out that this PR fixes an another issue. Updated issue number.

@shuding
Copy link
Member

shuding commented Mar 11, 2024

Thanks @kiwiyou! Could you please add a test case for it so it won't regress in the future?

@kiwiyou
Copy link
Author

kiwiyou commented Mar 11, 2024

@shuding Added 2 tests. I deliberately excluded tests for unsupported charsets. (e.g. charset=iso-8859-7)

@steven-tey
Copy link

steven-tey commented Mar 18, 2024

Edit: NVM, just saw your comment here #592 (comment)

Really appreciate your work on this @kiwiyou, but from the latest preview URL, this doesn't seem to work:

CleanShot 2024-03-18 at 23 38 09@2x

(PNG tab)

@kiwiyou
Copy link
Author

kiwiyou commented Apr 11, 2024

@shuding Could you review this PR?

@ducan-ne
Copy link

ducan-ne commented May 1, 2024

it still doesn't seem to work in my case too, Playground url

@kiwiyou
Copy link
Author

kiwiyou commented May 4, 2024

@ducan-ne It works on my machine, could you describe the step to reproduce the bug?

@ducan-ne
Copy link

ducan-ne commented May 4, 2024

@kiwiyou I don't know it just shows me a error when use the playground
CleanShot 2024-05-04 at 17 23 17@2x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Satori cannot render svg data URI with comma inside
4 participants