Skip to content

TestQuestionPool 47211: Escape long menu template values#11522

Open
matheuszych wants to merge 1 commit intoILIAS-eLearning:release_10from
matheuszych:ta/47211
Open

TestQuestionPool 47211: Escape long menu template values#11522
matheuszych wants to merge 1 commit intoILIAS-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.
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