Controlla cosa ti produce esattamente questa riga (vedi l'html che arriva al browser)

var parole = /\b(<?php echo $paroleProibite; ?>)\b/i;