]> git.donarmstrong.com Git - lilypond.git/commitdiff
Regtest script: Escape output for html.
authorJulien Rioux <jrioux@physics.utoronto.ca>
Sat, 14 Jan 2012 20:43:27 +0000 (15:43 -0500)
committerJulien Rioux <jrioux@physics.utoronto.ca>
Mon, 16 Jan 2012 20:29:38 +0000 (15:29 -0500)
scripts/build/output-distance.py

index f6375088248245e0cf82ba1671eb136eef259249..63b2853dae34411642ae06cba9a54059a4bbc512 100755 (executable)
@@ -505,7 +505,7 @@ class TextFileCompareLink (FileCompareLink):
         str = ''
         if oldnew == 1:
             str = '\n'.join ([d.replace ('\n','') for d in self.diff_lines])
-        str = '<font size="-2"><pre>%s</pre></font>' % str
+        str = '<font size="-2"><pre>%s</pre></font>' % cgi.escape (str)
         return str
 
 class LogFileCompareLink (TextFileCompareLink):
@@ -528,7 +528,7 @@ class ProfileFileLink (FileCompareLink):
                 str += '%-8s: %8d (%5.3f)\n' % (k, int (self.results[oldnew][k]),
                                                 self.get_ratio (k))
 
-        return '<pre>%s</pre>' % str
+        return '<pre>%s</pre>' % cgi.escape (str)
 
     def get_ratio (self, key):
         (v1,v2) = (self.results[0].get (key, -1),