Code

patch by hefee for LP bug 397793
[inkscape.git] / share / extensions / dxf_input.py
index 20c7757ddc99e6560c03ad250f70c45b713c31af..fcf5125afe8b13b988aa717ed9bdc84a9768a22b 100644 (file)
@@ -24,6 +24,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 import inkex, simplestyle, math
 from StringIO import StringIO
+from urllib import quote
 
 def export_MTEXT():
     # mandatory group codes : (1 or 3, 10, 20) (text, x, y)
@@ -238,7 +239,7 @@ def export_INSERT():
     if vals[groups['2']] and vals[groups['10']] and vals[groups['20']]:
         x = vals[groups['10']][0]
         y = vals[groups['20']][0] - scale*ymax
-        attribs = {'x': '%f' % x, 'y': '%f' % y, inkex.addNS('href','xlink'): '#' + vals[groups['2']][0]}
+        attribs = {'x': '%f' % x, 'y': '%f' % y, inkex.addNS('href','xlink'): '#' + quote(vals[groups['2']][0].encode("utf-8"))}
         inkex.etree.SubElement(layer, 'use', attribs)
 
 def export_BLOCK():