Skip to content

Commit

Permalink
Strip HTML from cmi.interactions.n.description.
Browse files Browse the repository at this point in the history
  • Loading branch information
danielghost committed Dec 4, 2024
1 parent d041c70 commit 807ff96
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions js/scorm/wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,8 @@ class ScormWrapper {
}
if (description) {
const maxLength = 250;
// strip HTML
description = $(`<p>${description}</p>`).text();
if (description.length > maxLength) description = description.substr(0, maxLength).trim();
this.setValue(`${cmiPrefix}.description`, description);
}
Expand Down

0 comments on commit 807ff96

Please sign in to comment.