Permalink
Browse files

updated essay and short answer code to work with quotes (single and d…

…ouble)
  • Loading branch information...
1 parent 611e79f commit 8061400e0f81965275660fd5cccbe83dd708974d michaelpenne committed Dec 1, 2004
Showing with 5 additions and 1 deletion.
  1. +5 −1 mod/lesson/lesson.php
@@ -715,6 +715,8 @@
$noanswer = true;
break;
}
+ $useranswer = stripslashes_safe($useranswer);
+
if (!$answers = get_records("lesson_answers", "pageid", $pageid, "id")) {
error("Continue: No answers found");
}
@@ -730,7 +732,7 @@
$userresponse->score = 0;
$userresponse->answer = $useranswer;
$userresponse->response = "";
- $userresponse = serialize($userresponse);
+ $userresponse = addslashes(serialize($userresponse));
break;
/// CDC-FLAG ///
@@ -740,6 +742,8 @@
break;
}
$userresponse = $useranswer;
+ $useranswer = stripslashes_safe($useranswer);
+
if (!$answers = get_records("lesson_answers", "pageid", $pageid, "id")) {
error("Continue: No answers found");
}

0 comments on commit 8061400

Please sign in to comment.