download
download copied to clipboard
Data URI decoder is not selected properly
function dataUrlToBlob(strUrl) {
var parts= strUrl.split(/[:;,]/),
type= parts[1],
decoder= parts[2] == "base64" ? atob : decodeURIComponent,
...
}
https://github.com/rndme/download/blob/master/download.js#L90
This one fails, it is generated with google first hit from text:
data:text/plain;charset=utf-8;base64,w4FydsOtenTFsXLFkXTDvGvDtnJmw7p0w7Nnw6lwLg==
The problem that the charset is given, so the second part is the charset rather than the encoding. You should parse the heading part of the URI instead of making presumptions on its structure.