URI-encode SVG data for Firefox-compatibility

pull/29/head
jmoenig 2016-12-07 14:14:43 +01:00
rodzic 3d905d139c
commit 72c0dcfe76
3 zmienionych plików z 27 dodań i 4 usunięć

5
gui.js
Wyświetl plik

@ -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 {

Wyświetl plik

@ -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

Wyświetl plik

@ -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);
}
);
}