roadmap
roadmap copied to clipboard
Error downloading docx version of a plan
Please complete the following fields as applicable:
What version of the DMPRoadmap code are you running? (e.g. v2.2.0)
v3.1.1
Expected behaviour:
to open a downloaded copy docx version of a plan
Actual behaviour:
downloads the plan but throws an error when you try to open it in MS Word
Cause for error: The content of the plan contains Windows file path with slashes and digits which is being confused as code.
LibreOffice was helpful in showing error line in docx file with .zip and extracting word\document.xml
The error was on the following line in document.xml
created by malformed xml
@johnpinto1 found the error and suggested a temporary solution:
use \\
for \
in Windows paths.
good catch @gjacob24!
Have a look at the config options for the wicked_pdf gem. There might be something in there to help properly escape these. If anything, the show_as_html: true
option might make it easier to debug or verify that your changes are working as expected. If not you may just need to address it in the view.
@briri @gjacob24 It looks like issue affects only docx downloads too. But does not break the rendering:
Text should have this file path
G:\Hematologie\Onderzoek\Studie Team Hematologie\Studies op alfabet\Aankomende studies\RODEO\00. DIGITAAL ISF\13. Case report Form (CRF)
Rendered correctly as:
HTML:
TEXT
PDF
As htmtoWord gem uses the HTML to create the DOCX file. Need to escape characters at that stage I think.