The vulnerability description states that the Lumi H5P-Nodejs-library before 9.3.3 omits a sanitizeHtml call for plain text strings. I analyzed the pull request associated with the fix (PR #3894) and its commits. The key commit is 77649fca644d5573e97c3355aa41a25827b789b8, which modifies packages/h5p-server/src/SemanticsEnforcer.ts. The patch introduces an else block that calls sanitizeHtml(newText). By examining the code structure of SemanticsEnforcer.ts from a version before the patch (e.g., v9.3.2), I identified that this change occurs within the enforceSemanticsRecursive method of the SemanticsEnforcer class. This method processes input based on semantic definitions. The vulnerability existed because, for text fields that didn't match specific, more complex HTML profiles (like those allowing only certain tags like 'p', 'br', 'strong', etc.), the input string (newText) was not passed through any sanitization function before further processing or assignment. This lack of sanitization in a specific code path within enforceSemanticsRecursive is the core of the vulnerability. The other commits in the PR were related to test adjustments and CI configuration changes, not directly to the vulnerable code logic itself.