jhbuild r2524 - in trunk: . jhbuild/frontends



Author: fpeters
Date: Sun Nov 16 22:58:48 2008
New Revision: 2524
URL: http://svn.gnome.org/viewvc/jhbuild?rev=2524&view=rev

Log:
* jhbuild/frontends/tinderbox.py: handle unicode errors with 'replace'
instead of 'xmlcharrefreplace' in tinderbox output.  (closes: #560579,
thanks Theppitak Karoonboonyanan for the debugging)



Modified:
   trunk/ChangeLog
   trunk/jhbuild/frontends/tinderbox.py

Modified: trunk/jhbuild/frontends/tinderbox.py
==============================================================================
--- trunk/jhbuild/frontends/tinderbox.py	(original)
+++ trunk/jhbuild/frontends/tinderbox.py	Sun Nov 16 22:58:48 2008
@@ -147,10 +147,9 @@
     return None
 
 def escape(string):
-    string = string.replace('&', '&')
     if type(string) is not unicode:
-        string = unicode(string, _encoding, 'xmlcharrefreplace')
-    string = string.replace('<','&lt;').replace(
+        string = unicode(string, _encoding, 'replace')
+    string = string.replace('&', '&amp;').replace('<','&lt;').replace(
             '>','&gt;').replace('\n','<br/>').replace(
             '\t','&nbsp;&nbsp;&nbsp;&nbsp;')
     return string



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]