diff options
Diffstat (limited to 'sphinx/builders/applehelp.py')
-rw-r--r-- | sphinx/builders/applehelp.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sphinx/builders/applehelp.py b/sphinx/builders/applehelp.py index 74f8fcfc6..db2d983a4 100644 --- a/sphinx/builders/applehelp.py +++ b/sphinx/builders/applehelp.py @@ -8,8 +8,8 @@ :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ -from __future__ import print_function +import html import pipes import plistlib import shlex @@ -25,13 +25,11 @@ from sphinx.util.console import bold # type: ignore from sphinx.util.fileutil import copy_asset from sphinx.util.matching import Matcher from sphinx.util.osutil import copyfile, ensuredir, make_filename -from sphinx.util.pycompat import htmlescape if False: # For type annotation from typing import Any, Dict # NOQA from sphinx.application import Sphinx # NOQA - from sphinx.util.typing import unicode # NOQA logger = logging.getLogger(__name__) @@ -188,8 +186,8 @@ class AppleHelpBuilder(StandaloneHTMLBuilder): logger.info(bold(__('building access page...')), nonl=True) with open(path.join(language_dir, '_access.html'), 'w') as ft: ft.write(access_page_template % { - 'toc': htmlescape(toc, quote=True), - 'title': htmlescape(self.config.applehelp_title) + 'toc': html.escape(toc, quote=True), + 'title': html.escape(self.config.applehelp_title) }) logger.info(__('done')) @@ -270,7 +268,7 @@ class AppleHelpBuilder(StandaloneHTMLBuilder): def setup(app): - # type: (Sphinx) -> Dict[unicode, Any] + # type: (Sphinx) -> Dict[str, Any] app.setup_extension('sphinx.builders.html') app.add_builder(AppleHelpBuilder) |