1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
Index: qpid-proton/python/tests/proton_tests/main.py
===================================================================
--- qpid-proton.orig/python/tests/proton_tests/main.py 2024-10-11 18:00:45.679506945 +0000
+++ qpid-proton/python/tests/proton_tests/main.py 2024-10-11 18:04:30.999986840 +0000
@@ -26,7 +26,7 @@
import time
import traceback
import types
-import cgi
+import html
from fnmatch import fnmatchcase as match
from logging import getLogger, StreamHandler, Formatter, Filter, \
WARN, DEBUG, ERROR, INFO
@@ -234,8 +234,8 @@
module = '.'.join(parts[0:-1])
self.f.write('<testcase classname="%s" name="%s" time="%f">\n' % (module, method, result.time))
if result.failed:
- escaped_type = cgi.escape(str(result.exception_type))
- escaped_message = cgi.escape(str(result.exception_message))
+ escaped_type = html.escape(str(result.exception_type))
+ escaped_message = html.escape(str(result.exception_message))
self.f.write('<failure type="%s" message="%s">\n' % (escaped_type, escaped_message))
self.f.write('<![CDATA[\n')
self.f.write(result.formatted_exception_trace)
|