summaryrefslogtreecommitdiff
path: root/sphinx/builders/htmlhelp.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-12-16 00:49:54 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2018-12-16 00:53:56 +0900
commit357b1ce2e6d713fb8cfb5644421bf5ded989f32a (patch)
treeb99e16522017a1eccc9f7ad5b353aba790746908 /sphinx/builders/htmlhelp.py
parent79eec90f36f5a74e24cfd6740126396fd6567e07 (diff)
downloadsphinx-git-357b1ce2e6d713fb8cfb5644421bf5ded989f32a.tar.gz
Replace pycompat.htmlescape() by html.escape()
Diffstat (limited to 'sphinx/builders/htmlhelp.py')
-rw-r--r--sphinx/builders/htmlhelp.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/sphinx/builders/htmlhelp.py b/sphinx/builders/htmlhelp.py
index 24f3ab2c4..c95b8f0a3 100644
--- a/sphinx/builders/htmlhelp.py
+++ b/sphinx/builders/htmlhelp.py
@@ -10,6 +10,7 @@
:license: BSD, see LICENSE for details.
"""
+import html
import os
from os import path
@@ -23,7 +24,6 @@ from sphinx.locale import __
from sphinx.util import logging
from sphinx.util.nodes import NodeMatcher
from sphinx.util.osutil import make_filename_from_project
-from sphinx.util.pycompat import htmlescape
if False:
# For type annotation
@@ -280,7 +280,7 @@ class HTMLHelpBuilder(StandaloneHTMLBuilder):
write_toc(subnode, ullevel)
elif isinstance(node, nodes.reference):
link = node['refuri']
- title = htmlescape(node.astext()).replace('"', '&quot;')
+ title = html.escape(node.astext()).replace('"', '&quot;')
f.write(object_sitemap % (title, link))
elif isinstance(node, nodes.bullet_list):
if ullevel != 0:
@@ -310,7 +310,7 @@ class HTMLHelpBuilder(StandaloneHTMLBuilder):
item = ' <param name="%s" value="%s">\n' % \
(name, value)
f.write(item)
- title = htmlescape(title)
+ title = html.escape(title)
f.write('<LI> <OBJECT type="text/sitemap">\n')
write_param('Keyword', title)
if len(refs) == 0: