mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 12:45:04 +01:00
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:
parent
0eddfc6625
commit
32be01392d
@ -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)),'*'));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user