]> git.mjollnir.org Git - moodle.git/commitdiff
but fix for 5256
authortoyomoyo <toyomoyo>
Thu, 20 Apr 2006 02:20:32 +0000 (02:20 +0000)
committertoyomoyo <toyomoyo>
Thu, 20 Apr 2006 02:20:32 +0000 (02:20 +0000)
blog/edit.php
blog/lib.php

index 39983d1bffbfacfe3930112449a1d3a3a234cee5..699271ee9ddd272b096b5b51153993309ce6b948 100755 (executable)
@@ -4,7 +4,6 @@ require_once('../config.php');
 include_once('lib.php');
 require_login();
 
-$userid = optional_param('userid',     0, PARAM_INT);
 $courseid = optional_param('courseid', SITEID, PARAM_INT);
 $act = optional_param('act','',PARAM_ALPHA);
 
@@ -108,8 +107,6 @@ if (($post = data_submitted( get_referer() )) && confirm_sesskey()) {
     $post->body = '';
     $post->format = $defaultformat;
     $post->publishstate = 'draft';
-    $post->courseid  = $courseid;
-
 }
 
 if ($editid) {  // User is editing a post
index f8b8b9e798db2327e23f2fe599e52fce685ce2a3..a20596c5746bde39b895c5c0b09c05e9e31ebc16 100755 (executable)
 
         global $USER, $CFG, $course, $ME;
 
-        $template['body'] = get_formatted_entry_body($blogEntry->summary, $blogEntry->format);
+        $template['body'] = get_formatted_entry_body(stripslashes_safe($blogEntry->summary), $blogEntry->format);
         $template['title'] = '<a name="'. $blogEntry->subject .'"></a>';
         //enclose the title in nolink tags so that moodle formatting doesn't autolink the text
         $template['title'] .= '<span class="nolink">'. stripslashes_safe($blogEntry->subject);