1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-09-29 23:40:45 +00:00

Fix for identifying SVG images by file extension

This commit is contained in:
Jeremy Ruston 2012-03-03 13:39:35 +00:00
parent 9b8795856b
commit 505c332123
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ var ImageParser = function(options) {
ImageParser.prototype.parse = function(type,text) {
var src;
if(type === "image/svg+xml") {
if(type === "image/svg+xml" || type === ".svg") {
src = "data:" + type + "," + encodeURIComponent(text);
} else {
src = "data:" + type + ";base64," + text;

View File

@ -26,7 +26,7 @@ $$$
This renders as:
$$$image/svg+xml
$$$.svg
<svg xmlns="http://www.w3.org/2000/svg" width="150" height="100">
<circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="red" />
</svg>