MDL-21769 fixed input validation
authorPetr Skoda <skodak@moodle.org>
Sun, 7 Mar 2010 15:30:02 +0000 (15:30 +0000)
committerPetr Skoda <skodak@moodle.org>
Sun, 7 Mar 2010 15:30:02 +0000 (15:30 +0000)
mod/data/field/textarea/field.class.php

index 22caa2a..d30f645 100755 (executable)
@@ -53,6 +53,7 @@ class data_field_textarea extends data_field_base {
         if ($recordid && $content = $DB->get_record('data_content', array('fieldid'=>$this->field->id, 'recordid'=>$recordid))){
             $text   = $content->content;
             $format = $content->content1;
         if ($recordid && $content = $DB->get_record('data_content', array('fieldid'=>$this->field->id, 'recordid'=>$recordid))){
             $text   = $content->content;
             $format = $content->content1;
+            $text = clean_text($text, $format);
         } else if (can_use_html_editor()) {
             $format = FORMAT_HTML;
         } else {
         } else if (can_use_html_editor()) {
             $format = FORMAT_HTML;
         } else {