Fix data:image/svg link loading for imagelib extension; fix server_opensave-extension-opened SVG files for older browsers; leverage utilities base 64 encoding in place of btoa also in server_opensave extension
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2614 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -38,7 +38,7 @@ svgEditor.addExtension("server_opensave", {
|
||||
filename = getFileNameFromTitle();
|
||||
|
||||
//if (clientDownloadSupport(filename, '.svg', 'data:image/svg+xml,' + encodeURI(data))) { // Firefox limits size of file
|
||||
if (clientDownloadSupport(filename, '.svg', 'data:image/svg+xml;base64,' + window.btoa(data))) {
|
||||
if (clientDownloadSupport(filename, '.svg', 'data:image/svg+xml;base64,' + svgedit.utilities.encode64(data))) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -119,9 +119,9 @@ svgEditor.addExtension("server_opensave", {
|
||||
}
|
||||
|
||||
$('#dialog_box').hide();
|
||||
|
||||
|
||||
if (type !== 'import_img') {
|
||||
xmlstr = svgCanvas.Utils.decode64(str64);
|
||||
xmlstr = svgedit.utilities.decode64(str64);
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
|
||||
Reference in New Issue
Block a user