From 807ff963efeb13fa19f7d6960fd9369db749b704 Mon Sep 17 00:00:00 2001 From: danielghost Date: Wed, 4 Dec 2024 18:07:20 +0000 Subject: [PATCH] Strip HTML from `cmi.interactions.n.description`. --- js/scorm/wrapper.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/scorm/wrapper.js b/js/scorm/wrapper.js index 0d154d7..3d51b9d 100644 --- a/js/scorm/wrapper.js +++ b/js/scorm/wrapper.js @@ -658,6 +658,8 @@ class ScormWrapper { } if (description) { const maxLength = 250; + // strip HTML + description = $(`

${description}

`).text(); if (description.length > maxLength) description = description.substr(0, maxLength).trim(); this.setValue(`${cmiPrefix}.description`, description); }