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:
@@ -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)),'*'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user