mirror of
https://git.proxmox.com/git/llvm-toolchain
synced 2025-06-19 20:29:18 +00:00
Convert cgi to html method
This commit is contained in:
parent
416de03a03
commit
cbed89cedb
44
debian/patches/no-cgi.patch
vendored
Normal file
44
debian/patches/no-cgi.patch
vendored
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
Description: cgi method is deprecated, use html instead
|
||||||
|
Author: Gianfranco Costamagna <locutusofborg@debian.org>
|
||||||
|
Last-Update: 2020-02-25
|
||||||
|
|
||||||
|
--- llvm-toolchain-10-10.0.0~+rc2.orig/llvm/tools/opt-viewer/opt-viewer.py
|
||||||
|
+++ llvm-toolchain-10-10.0.0~+rc2/llvm/tools/opt-viewer/opt-viewer.py
|
||||||
|
@@ -3,7 +3,7 @@
|
||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
-import cgi
|
||||||
|
+import html
|
||||||
|
import codecs
|
||||||
|
import errno
|
||||||
|
import functools
|
||||||
|
@@ -200,7 +200,7 @@ class IndexRenderer:
|
||||||
|
self.max_hottest_remarks_on_index = max_hottest_remarks_on_index
|
||||||
|
|
||||||
|
def render_entry(self, r, odd):
|
||||||
|
- escaped_name = cgi.escape(r.DemangledFunctionName)
|
||||||
|
+ escaped_name = html.escape(r.DemangledFunctionName)
|
||||||
|
print(u'''
|
||||||
|
<tr>
|
||||||
|
<td class=\"column-entry-{odd}\"><a href={r.Link}>{r.DebugLocString}</a></td>
|
||||||
|
--- llvm-toolchain-10-10.0.0~+rc2.orig/llvm/tools/opt-viewer/optrecord.py
|
||||||
|
+++ llvm-toolchain-10-10.0.0~+rc2/llvm/tools/opt-viewer/optrecord.py
|
||||||
|
@@ -10,7 +10,7 @@ except ImportError:
|
||||||
|
print("For faster parsing, you may want to install libYAML for PyYAML")
|
||||||
|
from yaml import Loader
|
||||||
|
|
||||||
|
-import cgi
|
||||||
|
+import html
|
||||||
|
from collections import defaultdict
|
||||||
|
import fnmatch
|
||||||
|
import functools
|
||||||
|
@@ -158,7 +158,7 @@ class Remark(yaml.YAMLObject):
|
||||||
|
(key, value) = list(mapping.items())[0]
|
||||||
|
|
||||||
|
if key == 'Caller' or key == 'Callee' or key == 'DirectCallee':
|
||||||
|
- value = cgi.escape(self.demangle(value))
|
||||||
|
+ value = html.escape(self.demangle(value))
|
||||||
|
|
||||||
|
if dl and key != 'Caller':
|
||||||
|
dl_dict = dict(list(dl))
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@ -138,3 +138,4 @@ no-z3.patch
|
|||||||
|
|
||||||
python3-shebang.patch
|
python3-shebang.patch
|
||||||
print-lldb-path.patch
|
print-lldb-path.patch
|
||||||
|
no-cgi.patch
|
||||||
|
Loading…
Reference in New Issue
Block a user