Comment 5 for bug 1192746

Revision history for this message
Tristan BENOIST (tristan-benoist) wrote :

Seems the error is back. The solution is simple as Hannes told, XMLSerilazer.toStream is deprecated. One needs to use toString in replacement.
The fix is the same as the one Hannes gave at the time I posted thos bug. It is the following : Edit your svg file with a text editor. Find the part begining with "// Serialise the new document." It should be :
var serializer = new XMLSerializer();
 var strm =
 {
  content : "",
  close : function() {},
  flush : function() {},
  write : function(str, count) { this.content += str; }
 };

 var xml = serializer.serializeToString(newDoc, strm, 'UTF-8');

 window.location = 'data:application/svg+xml;base64;charset=utf-8,' + window.btoa(strm.content);

Replace this whole block with :
w.location = 'data:application/svg+xml;base64;charset=utf-8,' + window.btoa(unescape(encodeURIComponent((new XMLSerializer()).serializeToString(newDoc))));

This should do the trick waiting for a proper fix or update on the jessyink version included in inkscape.