]> git.mjollnir.org Git - moodle.git/commitdiff
Allow <lang> tags in forum subjects.
authormoodler <moodler>
Sun, 15 Feb 2004 10:16:12 +0000 (10:16 +0000)
committermoodler <moodler>
Sun, 15 Feb 2004 10:16:12 +0000 (10:16 +0000)
And filter them is $CFG->filterall is on

mod/forum/lib.php
mod/forum/post.php

index 335e6a841c35125808aa8f80402a91666280e776..67a910cb122da853e875d1b7e78d3a4aeced6c1a 100644 (file)
@@ -1146,6 +1146,10 @@ function forum_print_post(&$post, $courseid, $ownpost=false, $reply=false, $link
     } else {
         echo "<td bgcolor=\"$THEME->cellheading2\" class=\"forumpostheadertopic\" width=\"100%\">";
     }
+
+    if (!empty($CFG->filterall)) {      /// Put the subject through the filters
+        $post->subject = filter_text($post->subject, $courseid);
+    }
     echo "<p>";
     echo "<font size=3><b>$post->subject</b></font><br />";
     echo "<font size=2>";
index bd784010a06e9fcfa4feb1617a06253a3991f879..9330047ff508114d75138941957afb20fd84f3c9 100644 (file)
@@ -20,7 +20,7 @@
             $errordestination = $SESSION->fromurl;
         }
 
-        $post->subject = strip_tags($post->subject);  // Strip all tags
+        $post->subject = strip_tags($post->subject, '<lang>');        // Strip all tags except lang
         $post->message = clean_text($post->message, $post->format);   // Clean up any bad tags
 
         $post->attachment = $_FILES["attachment"];