Closed StCyr closed 1 year ago
The issue seems to have been caused by the use of bullet points in the question text. When you take those out and replace them with newlines, it opens in word without issue.
Also happens on test.dmponline.be (more recent version).
apparently the ending </strong>
is not added after the question text, but a bit further after </ul>
. Moving that ending </strong>
back to the end of the question text "solves" this.
<strong>question title<br>
<ul>
<li>yes</li>
<li>no</li>
</ul>
</strong>
See https://github.com/DMPRoadmap/roadmap/blob/master/app/views/shared/export/_plan.erb#L45 See https://github.com/karnov/htmltoword/issues/73
Removing the <br>
(and keeping </strong>
at the end) helps too
Causes:
<strong>
(see https://github.com/DMPRoadmap/roadmap/blob/master/app/views/shared/export/_plan.erb#L45), as <div class="bold">
has no effect. But the results are varying, depending on the html in the question text.@laurastandaert any idea where these kind of question originate from? Question with bullet points in the question text seems like something that could be fixed just by using a select question, not?
Please complete the following fields as applicable:
What version of the DMPRoadmap code are you running? (e.g. v2.2.0) https://dmponline.be
Expected behaviour: MS Office can open all .docx document generated by DMPOnline
Actual behaviour: The "Horizon Europe DMP+" template generates plans that cannot be exported as MS Office compatible .docx files
Steps to reproduce:
Additional information If you modify (a copy of) this template and try to delete some sections, you will see that you'll need to delete them twice; It's like those sections where 2 times in the template