mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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:
parent
66323415c7
commit
7a1104d292
2 changed files with 19 additions and 10 deletions
|
@ -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():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue