alchemy-fr / PHP-dataURI

A PHP dataURI library, RFC 2397 Compliant
Other
59 stars 25 forks source link

Regexp was missing case #18

Open haykgh opened 5 years ago

haykgh commented 5 years ago

Dear contributors,

please replace following regular expression in Parser.php: '/data:([a-zA-Z-\/+]*)([a-zA-Z0-9-_;=.+]+)?,(.*)/' with '/data:([a-zA-Z-\/+.]*)([a-zA-Z0-9-_;=.+]+)?,(.*)/' to handle cases like application/vnd.ms-excel.

This is also missed test case 5.

Thanks.

joeyhub commented 4 years ago

Also...

'/^data:

A url can contain a data url.

gnutix commented 4 years ago

@jygaulier Should this issue be closed ? (the last comment about '/^data: was not implemented AFAIK)