From b6c760ccd7587810d5fc4b8a2215bd5dea791601 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Sun, 7 Mar 2010 15:23:58 +0000 Subject: [PATCH] MDL-21769 fixed input validation --- mod/assignment/type/online/assignment.class.php | 2 +- mod/assignment/type/upload/assignment.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/assignment/type/online/assignment.class.php b/mod/assignment/type/online/assignment.class.php index 14cf867a2f2..09fb8fca0b3 100644 --- a/mod/assignment/type/online/assignment.class.php +++ b/mod/assignment/type/online/assignment.class.php @@ -55,7 +55,7 @@ class assignment_online extends assignment_base { $defaults->text = format_text($submission->data1, $submission->data2, $options); $defaults->format = FORMAT_HTML; } else { - $defaults->text = $submission->data1; + $defaults->text = clean_text($submission->data1, $submission->data2); $defaults->format = $submission->data2; } } diff --git a/mod/assignment/type/upload/assignment.class.php b/mod/assignment/type/upload/assignment.class.php index 664ecf0dde4..3489b8cb23d 100644 --- a/mod/assignment/type/upload/assignment.class.php +++ b/mod/assignment/type/upload/assignment.class.php @@ -486,7 +486,7 @@ class assignment_upload extends assignment_base { $defaults->id = $this->cm->id; if ($submission = $this->get_submission($USER->id)) { - $defaults->text = $submission->data1; + $defaults->text = clean_text($submission->data1); } else { $defaults->text = ''; } -- 2.11.4.GIT