Commit 20f758bd authored by Akikonata's avatar Akikonata

encode

parent 283ee6b3
......@@ -91,13 +91,9 @@ KM.registerToolbarUI( 'saveto', function ( name ) {
return "png";
} else if ( res.value === "svg" ) {
var svghtml = $( "#kityminder .kmui-editor-body" ).html();
// var svg = new Blob( [ svghtml ], {
// type: "image/svg+xml;charset=utf-8"
// } );
var saveFile = function ( data, filename ) {
var save_link = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'a' );
//save_link.href = data;
save_link.href = 'data:image/svg+xml; utf-8,' + svghtml;
save_link.href = 'data:image/svg+xml; utf-8,' + encodeURI( svghtml );
save_link.download = filename;
var event = document.createEvent( 'MouseEvents' );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment