rndme / download

file downloading using client-side javascript
MIT License
2.29k stars 417 forks source link

Support data urls with missing mime-types #47

Closed ciaranj closed 7 years ago

ciaranj commented 7 years ago

According to https://tools.ietf.org/html/rfc2397 it should be valid to have a data url without a mime-type. This small change updates the 'dataURL' checking regular expression to support those types of data url.

ciaranj commented 7 years ago

I'll be honest with you, I've no idea how that dot removal or slash addition has occurred. I've never done an 'edit in github' before (I normally pull it locally) and I have to assume it's something to do with that as this change request was only meant to put in the (...)? around the mime-type part of the regex!?!?!

ciaranj commented 7 years ago

Right, this time I used the proper (do it with a clone locally) approach and it all seems fine. I've also corrected some more excess escaping in the regex!