Documentation tool: extra HTML markup when "export text" is clicked on the Word doc

When I "Export text," the Microsoft Word file shows extra HTML markup.

  1. Detailed steps to reproduce the bug (exactly how and when did it happen): See it at https://h5p.org/node/186093. If you provide a response and click through, when you get to the end, and click on "Export text," the Word file that shows up has extra HTML market. I've attached a screenshot of the Word file.
  2. Platform and version number. E.g. Drupal, Wordpress, Moodle: n/a. I'm using the h5p.org account
  3. Desktop
  4. Browser: Chrome, Firefox, Safari: Firefox
  5. H5P plugin version
  6. H5P content type and version (if a content type was used), and a sample URL or attached H5P.
  7. Any browser console errors: no
  8. Any PHP errors: No
  9. Screenshots if it's a visual problem
Content types: 
BV52's picture

Hi yang1018,

I can see the issue when I go through the content. However I am unable to reproduce the issue the issue creating my own content. Would you mind enabling the download option so that I can download and check the settings. There may be a specific set of settings that causes this.

-BV52

I enabled the download button. Thanks!

BV52's picture

Hi yang1018,

Thank you for enabling the option. Here's what I found out on what I think is causing the issue.

  • I can see the same issue after downloading the content and uploading to my account.
  • The settings are on default which doesn't explain what the cause is
  • I removed one of the texts and rewrite it and I did not see the issue
  • I noticed that on all of the lines there is an "ltr" which is short for left-to-right justification. I then tried writing a test text using Word and pasted it in the activity and I saw a similar issue.

 My question would be did you copy/paste the text from another software like word or from an email perhaps?

-BV52

Hello BV52,

Yes, I did. But I made sure to clear the formatting by clicking on the Tx button. Does that usually do the trick or should I be making sure I'm typing out the answers? Thank you!

BV52's picture

Hi yang1018,

Afaik that should take care of it, but as we both discovered it doesn't. I have filed a report regarding this and you can follow the progress here. In the mean time I suggest that you type them.

-BV52

Hello BV52,

I went into the settings and re-clicked on each question to ensure there weren't weird span tags and such. I saved the file—even though technically, I didn't change anything at all. I saved my work and tried exporting the text, and the extra code disappeared! Thanks for you assistance!

BV52's picture

Hi yang1018,

Thanks for sharing this at least it's a lot better than typing everything :-)

-BV52