Skip to content

TestQuestionPool 47211: Escape long menu template values#11522

Merged
kergomard merged 1 commit into
ILIAS-eLearning:release_10from
matheuszych:ta/47211
May 19, 2026
Merged

TestQuestionPool 47211: Escape long menu template values#11522
kergomard merged 1 commit into
ILIAS-eLearning:release_10from
matheuszych:ta/47211

Conversation

@matheuszych
Copy link
Copy Markdown
Contributor

See: https://mantis.ilias.de/view.php?id=47211

Gap answers that contained double quotes were injected verbatim into HTML attributes for the long-menu preview, which broke markup and prevented reliable evaluation of the learner selection. assLongMenuGUI now escapes solution text and option values with htmlspecialchars(..., ENT_QUOTES | ENT_SUBSTITUTE, 'utf-8') and compares the learner answer to options with === when marking the selected entry.

/cc @thojou

Comment thread components/ILIAS/TestQuestionPool/classes/class.assLongMenuGUI.php Outdated
Comment thread components/ILIAS/TestQuestionPool/classes/class.assLongMenuGUI.php Outdated
See: https://mantis.ilias.de/view.php?id=47211

Gap answers that contained double quotes were injected verbatim into HTML attributes for the long-menu preview, which broke markup and prevented reliable evaluation of the learner selection. `assLongMenuGUI` now escapes solution text and option values with `htmlspecialchars(..., ENT_QUOTES | ENT_SUBSTITUTE, 'utf-8')` and compares the learner answer to options with `===` when marking the selected entry.
@mjansenDatabay mjansenDatabay added bugfix php Pull requests that update Php code labels May 4, 2026
@kergomard kergomard merged commit 7682a10 into ILIAS-eLearning:release_10 May 19, 2026
3 checks passed
@kergomard
Copy link
Copy Markdown
Contributor

Thank you very much for the PR @matheuszych ! Merged and picked to ILIAS 11 and trunk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants