vercel / satori

Enlightened library to convert HTML and CSS to SVG

Home Page:https://og-playground.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Satori cannot render svg data URI with comma inside

kiwiyou opened this issue · comments

Bug report

Description / Observed Behavior

If charset is specified, satori cannot render svg data URI that contains , (comma).

svg in data URI with charset set and comma inside errors

Expected Behavior

satori successfully renders the svg.

svg in data URI with charset set and comma inside renders well

Reproduction

https://og-playground.vercel.app/?share=bZDLboQwDEV_BbnLUghtR4IUWFTqH3TJYniEkDYQRMyEEeLf69DtREqU63v8kHdoTSeAQ65GGdilLfZrV2PN1VhLEdubfN5G_dEO9WIFFiv2L2mYUzig8GSLCgbEmcexcy5yb5FZZPzKGPOZFfxDfNNq-n2IJlmWxadN8E0sVpmJwCRKvFbCfZqNNAtYkLDzVlDms9F3aaagV1qT-9SfhzJmoyb0Q11YeNJhegn8Q15c5n6o8nrQF0IwM1IzC3wHpzocgKfEwyCUHBD4uxedaFYJvK-1FSGI0fyo7_vs14XuVFSnNxN-jY3ogOOyiiMErBsiBqG1cWbRHRx_

Additional Context

Satori version, and any other context about the problem here.

It seems that data URI parsing is based on incorrect regex.
Original Specification