Issue #22924: Scripts gprof2html.py and highlight.py now use html.escape()

instead of deperecated cgi.escape().  Original patch by Raymond Hettinger.
This commit is contained in:
Serhiy Storchaka 2014-12-01 10:50:33 +02:00
parent 66323415c7
commit 7a1104d292
2 changed files with 19 additions and 10 deletions

View file

@ -2,7 +2,11 @@
"""Transform gprof(1) output into useful HTML."""
import re, os, sys, cgi, webbrowser
import html
import os
import re
import sys
import webbrowser
header = """\
<html>
@ -22,7 +26,7 @@ trailer = """\
def add_escapes(filename):
with open(filename) as fp:
for line in fp:
yield cgi.escape(line)
yield html.escape(line)
def main():