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);
$post->body = '';
$post->format = $defaultformat;
$post->publishstate = 'draft';
- $post->courseid = $courseid;
-
}
if ($editid) { // User is editing a post
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);