apycotlib: xml_escape strings before sending them to cw stable
authorJulien Cristau <julien.cristau@logilab.fr>
Wed, 15 May 2013 11:03:37 +0200
branchstable
changeset 916 c4e0dc323528
parent 898 08bfb5e7af25
child 920 d5aa45f491cf
apycotlib: xml_escape strings before sending them to cw Otherwise the log can't get displayed properly. Closes #2883714
_apycotlib/writer.py
--- a/_apycotlib/writer.py	Thu May 02 10:17:44 2013 +0200
+++ b/_apycotlib/writer.py	Wed May 15 11:03:37 2013 +0200
@@ -132,8 +132,9 @@
         print msg
 
     def _log(self, severity, path, line, msg):
-        encodedmsg = u'%s\t%s\t%s\t%s<br/>' % (severity, path or u'',
-                                               line or u'', xml_escape(msg))
+        encodedmsg = u'%s\t%s\t%s\t%s<br/>' % (severity, xml_escape(path or u''),
+                                               xml_escape(u'%s' % (line or u'')),
+                                               xml_escape(msg))
         self._logs.append(encodedmsg)
 
     def raw(self, name, value, type=None, commit=True):