From 9aa63755ee5c66516025b926c127c3f99cec2076 2014-03-20 08:11:42 From: Paul Ivanov Date: 2014-03-20 08:11:42 Subject: [PATCH] urlencode images for rst files closes #5350 --- diff --git a/IPython/nbconvert/filters/markdown.py b/IPython/nbconvert/filters/markdown.py index e550565..0d6f679 100755 --- a/IPython/nbconvert/filters/markdown.py +++ b/IPython/nbconvert/filters/markdown.py @@ -103,7 +103,7 @@ def markdown2html_marked(source, encoding='utf-8'): return out.rstrip('\n') def markdown2rst(source): - """Convert a markdown string to LaTeX via pandoc. + """Convert a markdown string to ReST via pandoc. This function will raise an error if pandoc is not installed. Any error messages generated by pandoc are printed to stderr. diff --git a/IPython/nbconvert/templates/rst.tpl b/IPython/nbconvert/templates/rst.tpl index 7f25aca..fdabe2a 100644 --- a/IPython/nbconvert/templates/rst.tpl +++ b/IPython/nbconvert/templates/rst.tpl @@ -38,15 +38,15 @@ {% endblock stream %} {% block data_svg %} -.. image:: {{ output.svg_filename }} +.. image:: {{ output.svg_filename|urlencode }} {% endblock data_svg %} {% block data_png %} -.. image:: {{ output.png_filename }} +.. image:: {{ output.png_filename|urlencode }} {% endblock data_png %} {% block data_jpg %} -.. image:: {{ output.jpeg_filename }} +.. image:: {{ output.jpeg_filename|urlencode }} {% endblock data_jpg %} {% block data_latex %}