discard bad mime types per spec

This commit is contained in:
Jimmy Wärting
2019-04-19 16:50:22 +02:00
parent 347f3d4f03
commit 6682a51050
+8 -1
View File
@@ -358,7 +358,14 @@
? concatTypedarrays(chunks)
: [].concat.apply([], chunks)
this.size = this._buffer.length
this.type = opts ? opts.type || '' : ''
this.type = opts.type || ''
if (/[^\u0020-\u007E]/.test(this.type)) {
this.type = ''
} else {
this.type = this.type.toLowerCase()
}
}
Blob.prototype.slice = function (start, end, type) {