Added original word as title to the blacked-out version. This is because

the filter can obscure actual important words by mistake (eg Dickens)
and there needs to be some way to recover the meaning.
This commit is contained in:
moodler
2005-07-30 08:54:43 +00:00
parent 43ba708ecc
commit 29d550cc82
+3 -1
View File
@@ -20,7 +20,9 @@ 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,str_pad('',strlen(trim($badword)),'*'));
$badword = trim($badword);
$words[] = new filterobject($badword, '<span class="censoredtext" title="'.$badword.'">', '</span>',
false, false, str_pad('',strlen($badword),'*'));
}
}