pypandoc > 1.6.4 breaks relative media links
lmende opened this issue · 2 comments
lmende commented
with:
[WARNING] Could not fetch resource ./plantuml/951024a08973cc301dbab7d20b52fd3a.svg: PandocResourceNotFound "./plantuml/951024a08973cc301dbab7d20b52fd3a.svg"
Steps to reproduce:
- string with html_content:
html_content = '''
<h2>foobar</h2><p><img src="./plantuml/951024a08973cc301dbab7d20b52fd3a.svg" class="uml" alt="uml diagram" title="" /></p>
'''
- convert with
output = pypandoc.convert_text(
html_content,
to='docx',
format='html',
outputfile= 'huhu.docx',
)
produces docx w/o image even if I provide kwarg cworkdir
. Conversion with pandoc on cmd line works.
JessicaTegner commented
@lmende can you confirm that you have set the "--resource-path" options?
In addition, I can't seem to figure out, why specifically pypandoc > 1.6.4 would break this.
sanjass commented
Setting sandbox=False
fixed it for me, but see my full comment here