diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-06-03 18:31:53 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-06-03 18:31:53 +0300 |
commit | 85da1b60723fa3a5109ac911e780ece68c23e4e1 (patch) | |
tree | eca3e448cede36112747a1dc9823c7aa57a91dfa /sphinx | |
parent | 7140d85fc421b1d281a801eaf8aff96691a111cd (diff) |
Fix #7723: LaTeX: pdflatex crashed when URL contains a single quote
Diffstat (limited to 'sphinx')
-rw-r--r-- | sphinx/writers/latex.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index 6e7f5021b..113e28390 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -1977,7 +1977,8 @@ class LaTeXTranslator(SphinxTranslator): # mainly, %, #, {, } and \ need escaping via a \ escape # in \href, the tilde is allowed and must be represented literally return self.encode(text).replace('\\textasciitilde{}', '~').\ - replace('\\sphinxhyphen{}', '-') + replace('\\sphinxhyphen{}', '-').\ + replace('\\textquotesingle{}', "'") def visit_Text(self, node: Text) -> None: text = self.encode(node.astext()) |