[BugFix] Bug #4828 - \ stripping problem

This commit is contained in:
michaelpenne 2006-02-24 19:42:13 +00:00
parent ee27cca526
commit 0ac9372517

View file

@ -101,11 +101,11 @@ class quiz_essay_qtype extends quiz_default_questiontype {
// this prints out the student response box // this prints out the student response box
if (isset($state->responses[''])) { if (isset($state->responses[''])) {
// security problem. responses[''] is never cleaned before it is sent to the db (I think) // security problem. responses[''] is never cleaned before it is sent to the db (I think)
$value = clean_param($state->responses[''], PARAM_CLEANHTML); $value = clean_param(addslashes($state->responses['']), PARAM_CLEANHTML);
} else { } else {
$value = ""; $value = "";
} }
$inputname = $nameprefix; $inputname = $nameprefix;
echo "<p>$stranswer: ". echo "<p>$stranswer: ".