In question tables (i.e. what you see when you click on the 'Manage questions' tab of a quiz), the body of quiz questions is run through check_markup() twice, once with the correct format specified, and once without. The first time is quiz_node_map() (called from _quiz_get_questions()) and the second is in theme_quiz_question_table().
The second call to check_markup() (from within theme_quiz_question_table()) does not include a format option, whereas the first does, so it may strip out things that were allowed by the format chosen for the question body. In my case, the questions contained images that were being stripped out by this second call to check_markup().
I believe the solution is simply to remove this second call to check_markup(), and I've included a patch to do this. Is there any reason why this solution is a bad idea?
Ben
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | quiz_markup.patch | 632 bytes | westwesterson |
| quiz_check_markup.patch | 462 bytes | benwei |
Comments
Comment #1
westwesterson commentedthis is a feature request, direct feature requests to head version
Comment #2
westwesterson commentedHave reviewed this patch and code wise it seems sound, since this potentially has security ramnifications, i think this should be looked over by someone else as well. I include the rerolled patch, the only difference in this is the line number. I think it would be great to allow questions with filtered content on the admin pages. This creates a better interface for audio and image questions.
Comment #3
kylebrowning commentedThis patch is WAI
Comment #4
westwesterson commentedComment #5
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.