mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-38243, xmlrpc.server: Escape the server_title (GH-16373)
Escape the server title of xmlrpc.server.DocXMLRPCServer when rendering the document page as HTML.
This commit is contained in:
parent
dd6117c6d7
commit
e8650a4f8c
3 changed files with 21 additions and 1 deletions
|
@ -108,6 +108,7 @@ from xmlrpc.client import Fault, dumps, loads, gzip_encode, gzip_decode
|
|||
from http.server import BaseHTTPRequestHandler
|
||||
from functools import partial
|
||||
from inspect import signature
|
||||
import html
|
||||
import http.server
|
||||
import socketserver
|
||||
import sys
|
||||
|
@ -894,7 +895,7 @@ class XMLRPCDocGenerator:
|
|||
methods
|
||||
)
|
||||
|
||||
return documenter.page(self.server_title, documentation)
|
||||
return documenter.page(html.escape(self.server_title), documentation)
|
||||
|
||||
class DocXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
|
||||
"""XML-RPC and documentation request handler class.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue