I have a little shoutbox in my school site.. You know how students are always writing things so i've implemented a bad word detector..
i have an array ($asneiras) with the bad words and another ($correctas) with the corrections (to make it a little funny)
then i have this code
$text=preg_replace($asneiras,$limpas,$text);
it all works fine if the bad word is wrote all in small caps like in the array otherwise it doesnt work.. Any idea?
The other problem is with the html blocker.. I used htmlspecialchars but when somebody writes "" it appears /"/".. I would appreciate if someone helps.. Thanks 😉