Index: scripts/build/output-distance.py diff --git a/scripts/build/output-distance.py b/scripts/build/output-distance.py index 0fd9fff6efd85e95859d723d89a5b1aeb51abda8..44dad07d6ae4cd69ad1b4abf7c861d4761a0fb80 100755 --- a/scripts/build/output-distance.py +++ b/scripts/build/output-distance.py @@ -7,7 +7,7 @@ import os import math import re -import cgi +import html from functools import reduce ## so we can call directly as scripts/build/output-distance.py @@ -509,7 +509,7 @@ class GitFileCompareLink (FileCompareLink): str = '\n'.join ([l[:80] for l in str.split ('\n')]) if str: - str = '
%s' % cgi.escape (str) + str = '
%s' % html.escape (str) return '', str def calc_distance (self): @@ -557,7 +557,7 @@ class TextFileCompareLink (FileCompareLink): if oldnew == 1: str = '\n'.join ([d.replace ('\n','') for d in self.diff_lines]) if str: - str = '
%s' % cgi.escape (str) + str = '
%s' % html.escape (str) return '', str class LogFileCompareLink (TextFileCompareLink): @@ -586,7 +586,7 @@ class ProfileFileLink (FileCompareLink): str += '%-8s: %d\n' % (k, int (self.results[oldnew][k])) if str: - str = '
%s' % cgi.escape (str) + str = '
%s' % html.escape (str) return '', str def get_ratio (self, key):