From: moodler Date: Sun, 15 Feb 2004 10:16:12 +0000 (+0000) Subject: Allow tags in forum subjects. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=83ec90983748d30cabc36a676f60b03fc7afadfa;p=moodle.git Allow tags in forum subjects. And filter them is $CFG->filterall is on --- diff --git a/mod/forum/lib.php b/mod/forum/lib.php index 335e6a841c..67a910cb12 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -1146,6 +1146,10 @@ function forum_print_post(&$post, $courseid, $ownpost=false, $reply=false, $link } else { echo "cellheading2\" class=\"forumpostheadertopic\" width=\"100%\">"; } + + if (!empty($CFG->filterall)) { /// Put the subject through the filters + $post->subject = filter_text($post->subject, $courseid); + } echo "

"; echo "$post->subject
"; echo ""; diff --git a/mod/forum/post.php b/mod/forum/post.php index bd784010a0..9330047ff5 100644 --- a/mod/forum/post.php +++ b/mod/forum/post.php @@ -20,7 +20,7 @@ $errordestination = $SESSION->fromurl; } - $post->subject = strip_tags($post->subject); // Strip all tags + $post->subject = strip_tags($post->subject, ''); // Strip all tags except lang $post->message = clean_text($post->message, $post->format); // Clean up any bad tags $post->attachment = $_FILES["attachment"];