Skip to content

Commit 52f2a59

Browse files
committed
bpo-38243: Escape the server_title of DocXMLRPCServer when rendering
1 parent 221fd84 commit 52f2a59

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Lib/xmlrpc/server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ def export_add(self, x, y):
108108
from http.server import BaseHTTPRequestHandler
109109
from functools import partial
110110
from inspect import signature
111+
import html
111112
import http.server
112113
import socketserver
113114
import sys
@@ -894,7 +895,7 @@ def generate_html_documentation(self):
894895
methods
895896
)
896897

897-
return documenter.page(self.server_title, documentation)
898+
return documenter.page(html.escape(self.server_title), documentation)
898899

899900
class DocXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
900901
"""XML-RPC and documentation request handler class.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Escape the server_title of :class:`DocXMLRPCServer` when rendering the
2+
document page. (Contributed by Dong-hee Na in :issue:`38243`.)

0 commit comments

Comments
 (0)