Yes, in next version it already fixed. You could replace this line with:
$word = trim($badWords[$i]);
if ($word != '') {
$word = str_replace('#', '\#', str_replace('\#', '#', $word));
$txt = trim(preg_replace('#'. $word.'#ism'. JCOMMENTS_PCRE_UTF8, $replaceWord, $text));
// make safe from dummy bad words list
if ($txt != '') {
$text = $txt;
}
}