Fixed problem with SVG images identified by file extension

This commit is contained in:
Jeremy Ruston
2012-03-03 13:52:10 +00:00
parent 505c332123
commit 9de3bb6f59
+1 -1
View File
@@ -21,7 +21,7 @@ var ImageParser = function(options) {
ImageParser.prototype.parse = function(type,text) { ImageParser.prototype.parse = function(type,text) {
var src; var src;
if(type === "image/svg+xml" || type === ".svg") { if(type === "image/svg+xml" || type === ".svg") {
src = "data:" + type + "," + encodeURIComponent(text); src = "data:image/svg+xml," + encodeURIComponent(text);
} else { } else {
src = "data:" + type + ";base64," + text; src = "data:" + type + ";base64," + text;
} }