Changed to use the new replacementphrase attribute so

bad words are replaced with a strlen(phrase) number
of **** characters. Bug 3605.
(http://moodle.org/bugs/bug.php?op=show&bugid=3605)
This commit is contained in:
stronk7
2005-06-22 23:33:08 +00:00
parent aadb24e091
commit 6add2dbfc7
+1 -1
View File
@@ -20,7 +20,7 @@ function censor_filter($courseid, $text) {
$words = array();
$badwords = explode(',', get_string('badwords', 'censor'));
foreach ($badwords as $badword) {
$words[] = new filterobject(trim($badword), '<span class="censoredtext">', '</span>', false, false);
$words[] = new filterobject(trim($badword), '<span class="censoredtext">', '</span>', false, false,str_pad('',strlen(trim($badword)),'*'));
}
}