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

Merged
merged 4 commits into from
Jul 4, 2024
Merged

Conversation

kiwiyou
Copy link
Contributor

@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 Jun 15, 2024 9:25am

@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
Contributor 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
Contributor 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
Contributor 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
Contributor 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

@kiwiyou
Copy link
Contributor Author

kiwiyou commented Jun 15, 2024

@ducan-ne Your example works fine. Did you use the playground provided for this PR?

@kiwiyou
Copy link
Contributor Author

kiwiyou commented Jun 15, 2024

@shuding Do you have any blockades for the review?

@ducan-ne
Copy link

ducan-ne commented Jun 15, 2024

@kiwiyou it works the first time but not after that, try enter something to the editor (use my reproduce url)

the evidence:
CleanShot 2024-06-16 at 00 17 43@2x

@kiwiyou
Copy link
Contributor Author

kiwiyou commented Jun 15, 2024

@ducan-ne Your problem seems to be the case for #592, not #597 here.

Copy link
Member

@shuding shuding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Copy link
Member

@shuding shuding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@shuding shuding merged commit 965b3a1 into vercel:main Jul 4, 2024
9 checks passed
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