MDL-32316 feedback: fix tem type label does honor trusted text
authorAndreas Grabs <moodle@grabs-edv.de>
Mon, 9 Apr 2012 22:26:08 +0000 (00:26 +0200)
committerAndreas Grabs <moodle@grabs-edv.de>
Mon, 9 Apr 2012 22:26:08 +0000 (00:26 +0200)
mod/feedback/item/label/label_form.php
mod/feedback/item/label/lib.php

index bb2c1cb..7a44530 100644 (file)
@@ -42,7 +42,7 @@ class feedback_label_form extends feedback_item_form {
 
         $mform->addElement('header', 'general', get_string($this->type, 'feedback'));
         $mform->addElement('editor', 'presentation_editor', '', null, $presentationoptions);
-        $mform->setType('presentation_editor', PARAM_CLEANHTML);
+        $mform->setType('presentation_editor', PARAM_RAW);
 
         parent::definition();
         $this->set_data($item);
index f1dcd28..25c62a9 100644 (file)
@@ -167,7 +167,8 @@ class feedback_item_label extends feedback_item_base {
                                                $filearea,
                                                $item->id);
 
-        echo format_text($output, FORMAT_HTML, array('overflowdiv'=>true));
+        $formatoptions = array('overflowdiv'=>true, 'trusted'=>$CFG->enabletrusttext);
+        echo format_text($output, FORMAT_HTML, $formatoptions);
     }
 
     /**