validation - php form curse-word input filter solution -
i'm building web app php , codeigniter framework, , 1 of requirements client implement 'swear word' filter on validation. know of prebuilt solutions written in php? or alternatively, exhaustive list of curse words can format php syntaxed array , check presence in user's input? thanks!
this should able started basic idea, you'll have fill bad words in yourself. you can download list of bad words here.
however, must warn swear-word filters have insurmountable issues. english language flexible prevent people spelling swear words in host of different ways. if can block @$$h01e
, you'll never reliably block αṡṡhølε
, can produced character translator. there's no way can begin filter out possibilities when each word , letter can have 20+ potential substitutes.
plus, once people realize have swear-word filter, may become game figure out how thwart it, can lead more swearing started with! if people want swear, find way so. fortunately, there plenty of sites have dealt problem. can make them not want swear giving them best experience website , content possible, , providing simple flag feature users can notify of unpreventable cases.
stackoverflow has no curse word filter, , how see swearing here? don't send computer human's job. :d
Comments
Post a Comment