Fix #2395: Sphinx crashs if unicode character in image filename

This commit is contained in:
Takeshi KOMIYA
2016-04-10 20:25:25 +09:00
parent 95e6e81de7
commit 9df7783ba2
4 changed files with 5 additions and 2 deletions

View File

@@ -29,6 +29,7 @@ Bugs fixed
* #2412: Fix hyperlink targets are broken in LaTeX builder
* Fix figure directive crashes if non paragraph item is given as caption
* #2418: Fix time formats no longer allowed in today_fmt
* #2395: Fix Sphinx crashs if unicode character in image filename
Release 1.4 (released Mar 28, 2016)

View File

@@ -58,7 +58,7 @@ class Config(object):
language = (None, 'env', string_classes),
locale_dirs = ([], 'env'),
figure_language_filename = ('{root}.{language}{ext}', 'env', [str]),
figure_language_filename = (u'{root}.{language}{ext}', 'env', [str]),
master_doc = ('contents', 'env'),
source_suffix = (['.rst'], 'env'),

View File

@@ -12,3 +12,5 @@ test-image-glob
.. figure:: img.*
The caption of img
.. image:: testimäge.png

View File

@@ -841,7 +841,7 @@ def test_image_glob_intl(app, status, warning):
@with_app(buildername='dummy', testroot='image-glob',
confoverrides={'language': 'xx',
'figure_language_filename': '{root}{ext}.{language}'})
'figure_language_filename': u'{root}{ext}.{language}'})
def test_image_glob_intl_using_figure_language_filename(app, status, warning):
app.builder.build_all()