diff --git a/src/scripts/h5p-crossword.js b/src/scripts/h5p-crossword.js index 95fb83e..f5a26e5 100644 --- a/src/scripts/h5p-crossword.js +++ b/src/scripts/h5p-crossword.js @@ -477,7 +477,8 @@ export default class Crossword extends H5P.Question { * @returns {string} Description. */ getDescription() { - const introduction = this.params.taskDescription || Crossword.DEFAULT_DESCRIPTION; + // The below replaceAll makes sure we don't get any unwanted XAPI_PLACEHOLDERs in the description + const introduction = this.params.taskDescription.replaceAll(/_{10,}/gi, '_________') || Crossword.DEFAULT_DESCRIPTION; const fields = this.content.getXAPIDescription(); return `${introduction}${fields}`; }