[GRASS-SVN] r53946 - grass/branches/releasebranch_6_4/gui/wxpython/gmodeler

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Nov 21 01:25:11 PST 2012


Author: martinl
Date: 2012-11-21 01:25:10 -0800 (Wed, 21 Nov 2012)
New Revision: 53946

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/gmodeler/model.py
Log:
gmodeler: encode also model/variables name
    (merge r53917 from trunk)


Modified: grass/branches/releasebranch_6_4/gui/wxpython/gmodeler/model.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gmodeler/model.py	2012-11-21 09:08:41 UTC (rev 53945)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gmodeler/model.py	2012-11-21 09:25:10 UTC (rev 53946)
@@ -1800,7 +1800,7 @@
         self.fd.write('%s<properties>\n' % (' ' * self.indent))
         self.indent += 4
         if self.properties['name']:
-            self.fd.write('%s<name>%s</name>\n' % (' ' * self.indent, self.properties['name']))
+            self.fd.write('%s<name>%s</name>\n' % (' ' * self.indent, EncodeString(self.properties['name'])))
         if self.properties['description']:
             self.fd.write('%s<description>%s</description>\n' % (' ' * self.indent,
                                                                  utils.EncodeString(self.properties['description'])))
@@ -1822,11 +1822,11 @@
         self.indent += 4
         for name, values in self.variables.iteritems():
             self.fd.write('%s<variable name="%s" type="%s">\n' % \
-                              (' ' * self.indent, name, values['type']))
+                              (' ' * self.indent, EncodeString(name), values['type']))
             self.indent += 4
             if 'value' in values:
                 self.fd.write('%s<value>%s</value>\n' % \
-                                  (' ' * self.indent, values['value']))
+                                  (' ' * self.indent, EncodeString(values['value'])))
             if 'description' in values:
                 self.fd.write('%s<description>%s</description>\n' % \
                                   (' ' * self.indent, EncodeString(values['description'])))
@@ -2002,7 +2002,7 @@
 #
 #%s
 """ % ('#' * 79,
-       properties['name'],
+       EncodeString(properties['name']),
        EncodeString(properties['author']),
        EncodeString('\n# '.join(properties['description'].splitlines())),
        time.asctime(),



More information about the grass-commit mailing list