satori icon indicating copy to clipboard operation
satori copied to clipboard

fix: incorrect data URL parsing

Open kiwiyou opened this issue 1 year ago • 10 comments

Fixes #597 with correct regex.

Data URL Specification

kiwiyou avatar Feb 29 '24 22:02 kiwiyou

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

vercel[bot] avatar Feb 29 '24 22:02 vercel[bot]

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

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

steven-tey avatar Mar 05 '24 16:03 steven-tey

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

kiwiyou avatar Mar 05 '24 21:03 kiwiyou

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

shuding avatar Mar 11 '24 18:03 shuding

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

kiwiyou avatar Mar 11 '24 21:03 kiwiyou

Edit: NVM, just saw your comment here https://github.com/vercel/satori/issues/592#issuecomment-1979586066

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)

steven-tey avatar Mar 18 '24 21:03 steven-tey

@shuding Could you review this PR?

kiwiyou avatar Apr 11 '24 04:04 kiwiyou

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

ducan-ne avatar May 01 '24 17:05 ducan-ne

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

kiwiyou avatar May 04 '24 06:05 kiwiyou

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

ducan-ne avatar May 04 '24 10:05 ducan-ne

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

kiwiyou avatar Jun 15 '24 09:06 kiwiyou

@shuding Do you have any blockades for the review?

kiwiyou avatar Jun 15 '24 09:06 kiwiyou

@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

ducan-ne avatar Jun 15 '24 17:06 ducan-ne

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

kiwiyou avatar Jun 15 '24 19:06 kiwiyou