Skip to content

bpo-38243: Escape the server_title of DocXMLRPCServer when rendering #16373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 27, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Lib/xmlrpc/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ def export_add(self, x, y):
from http.server import BaseHTTPRequestHandler
from functools import partial
from inspect import signature
import html
import http.server
import socketserver
import sys
Expand Down Expand Up @@ -894,7 +895,7 @@ def generate_html_documentation(self):
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.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Escape the server_title of :class:`DocXMLRPCServer` when rendering the
document page. (Contributed by Dong-hee Na in :issue:`38243`.)