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)

Merged from MOODLE_15_STABLE
This commit is contained in:
stronk7 2005-06-22 23:34:26 +00:00
parent 0eddfc6625
commit 32be01392d

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)),'*'));
}
}