Moodle Word Censorship

It was brought to my attention that when Moodle filters out a word found in the "bad words" list it in fact leaves the word in the alt text.  So moving your mouse over the word "Scunthorpe" produces some quite interesting results!!

The resolve this I edited the file filter/censor/filter.php

And around line 36 replace this code

 $words[ ] = new filterobject($badword, '<span class="censoredtext" title=".$badword.">', '</span>',

with this:

 $words[ ] = new filterobject($badword, '<span class="censoredtext" title="Censored">', '</span>',

The ALT text now reads the word "censored" rather than displaying the offending word you tried to remove in the first place.

 

No votes yet
By lewiscarr under censorship
Add new comment |

1 comments on Moodle Word Censorship

  • Anonymous

    Here is another interesting censoring issue:

    http://tracker.moodle.org/browse/MDL-14582

    Students can swear by placing the swear word in a hyperlink.

    This will be resolved (or resolvable) in Moodle 2.0 (apparently)

  • Similar entries