Allow <lang> tags in forum subjects.

And filter them is $CFG->filterall is on
This commit is contained in:
moodler 2004-02-15 10:16:12 +00:00
parent 3c89f9a837
commit 83ec909837
2 changed files with 5 additions and 1 deletions

View file

@ -1146,6 +1146,10 @@ function forum_print_post(&$post, $courseid, $ownpost=false, $reply=false, $link
} else { } else {
echo "<td bgcolor=\"$THEME->cellheading2\" class=\"forumpostheadertopic\" width=\"100%\">"; 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 "<p>";
echo "<font size=3><b>$post->subject</b></font><br />"; echo "<font size=3><b>$post->subject</b></font><br />";
echo "<font size=2>"; echo "<font size=2>";

View file

@ -20,7 +20,7 @@
$errordestination = $SESSION->fromurl; $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->message = clean_text($post->message, $post->format); // Clean up any bad tags
$post->attachment = $_FILES["attachment"]; $post->attachment = $_FILES["attachment"];