Skip to content

Commit

Permalink
fix: svg data uri regex
Browse files Browse the repository at this point in the history
  • Loading branch information
kiwiyou committed Feb 29, 2024
1 parent 9bc47fd commit 964dff0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/handler/image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export async function resolveImageData(

try {
decodedURI =
/data:(?<imageType>[a-z/+]+)(;(charset=)?(?<encodingType>.*))?,(?<dataString>.*)/g.exec(
/data:(?<imageType>[a-z/+]+)(;(charset=)?(?<encodingType>[^,]*))?,(?<dataString>.*)/g.exec(
src
).groups as typeof decodedURI
} catch (err) {
Expand Down

0 comments on commit 964dff0

Please sign in to comment.