The TeX filter is supposed to work only in the "Mathematics Tools" forum. It shouldn't mess with the following text. Let's check:
- Down with Micro$$oft$$!
- Down with $$CO leeche$$!
- $$#!%$%$$!!
Hmm??
It was this code, just before the umask() call in the filter function:
if (strstr($scriptname,'post.php')) {
$parent = forum_get_post_full($_GET['reply']);
$discussion = get_record("forum_discussions","id",$parent->discussion);
} else if (strstr($scriptname,'discuss.php')) {
$discussion = get_record("forum_discussions","id",$_GET['d'] );
} else {
return $text;
}
if ($discussion->forum != 130) {
return $text;
}
The id of the Mathematics Tools forum is 130. Seriously, I think it might be helpful to have something like this as a model, showing how one can customize the action of filters, so they act in only certain courses, or certain activities within courses.