From 72c0dcfe761d7d9997b3e47b07c536daded4f95f Mon Sep 17 00:00:00 2001 From: jmoenig Date: Wed, 7 Dec 2016 14:14:43 +0100 Subject: [PATCH] URI-encode SVG data for Firefox-compatibility --- gui.js | 5 +++-- history.txt | 21 +++++++++++++++++++++ morphic.js | 5 +++-- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/gui.js b/gui.js index 1ebe62ab..a765a95c 100644 --- a/gui.js +++ b/gui.js @@ -72,7 +72,7 @@ isRetinaSupported, SliderMorph, Animation*/ // Global stuff //////////////////////////////////////////////////////// -modules.gui = '2016-December-06'; +modules.gui = '2016-December-07'; // Declarations @@ -3133,7 +3133,8 @@ IDE_Morph.prototype.popupMediaImportDialog = function (mediaType, items) { myself.getURL( url, function (txt) { - img.src = 'data:image/svg+xml;utf8,' + txt; + img.src = 'data:image/svg+xml;utf8,' + + encodeURIComponent(txt); } ); } else { diff --git a/history.txt b/history.txt index 5a215f42..3c6eee5a 100755 --- a/history.txt +++ b/history.txt @@ -3170,3 +3170,24 @@ http://snap.berkeley.edu/run#cloud:Username=jens&ProjectName=rotation * GUI: Switch to asynchronous loading of resources (costumes, sounds, libraries etc.) * Morphic: Added support for dropping links to SVGs from other web pages onto the World * GUI: Support importing unrasterized SVG_Costumes from the “Costumes” and “Backgrounds” dialog + +161207 +------ +* Morphic, GUI: URI-encode SVG data for Firefox-compatibility + + +== v4.10 === (in development) + +Features: +* auto-wrapping of C-slots +* undo / redo for blocks, unlimited, but has some issues +* search field for projects, thanks, Bernat!! +* basic typography support for custom block labels, thanks, Bernat!! +* Treat JS-function reporters the same as variable getters wrt rings +* new url switch #dl: for downloading raw shared projects +* svg support for images from the web (svg files have been supported for a long time) + +Fixes: +* Music (play note) to work again in new and recent browser versions (Chrome 55) +* IDE layout: fixed resizing issues when the window becomes too small + diff --git a/morphic.js b/morphic.js index e6da8fa7..9b8fc2db 100644 --- a/morphic.js +++ b/morphic.js @@ -1136,7 +1136,7 @@ /*global window, HTMLCanvasElement, FileReader, Audio, FileList*/ -var morphicVersion = '2016-December-06'; +var morphicVersion = '2016-December-07'; var modules = {}; // keep track of additional loaded modules var useBlurredShadows = getBlurredShadowSupport(); // check for Chrome-bug @@ -10921,7 +10921,8 @@ HandMorph.prototype.processDrop = function (event) { ) ); }; - pic.src = 'data:image/svg+xml;utf8,' + txt; + pic.src = 'data:image/svg+xml;utf8,' + + encodeURIComponent(txt); } ); }