Thanks Andy. Matt Q actually found me a UDF in cflib that loops pretty much the same way as your code. It does, however, just replaces the profanity with "&[EMAIL PROTECTED]" chars.
Michael > -----Original Message----- > From: Andy Matthews [mailto:[EMAIL PROTECTED] > Sent: Monday, March 12, 2007 6:10 AM > To: CF-Talk > Subject: RE: Obscenity/Bad Words filter udf/cfc? > > I don't have a UDF or CFC, but I do have some code for you: > > <!--- list of no-no terms ---> > <cfset VARIABLES.valid = 1> > <cfset VARIABLES.badterms = > "MIME-Version,Content-Type,bcc:,Content-Transfer-Encoding,text/plain"> > > <!--- loop over form fields and see if there's any crap in them ---> > <cfloop index="field" list="#FORM.fieldnames#"> > <!--- loop over bad terms on this form field ---> > <cfloop index="term" list="#VARIABLES.badterms#"> > <!--- if there's crap in the form field then cancel the loop > and break out ---> > <cfif FindNoCase(term,Evaluate("FORM."&field))> > <cfset VARIABLES.valid = 0> > <cfbreak> > </cfif> > </cfloop> > <!--- if there's crap in the form field then cancel the loop and > break out ---> > <cfif NOT VARIABLES.valid> > <cfbreak> > </cfif> > </cfloop> > > <cfif NOT VARIABLES.valid> > <cflocation url="http://www.fortna.com" addToken="no"> > <cfelse> > FORM GOES HERE > </cfif> > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Friday, March 09, 2007 6:15 PM > To: CF-Talk > Subject: Obscenity/Bad Words filter udf/cfc? > > Before I create something on my own, I was wondering if anyone already has > an available obscenity or bad-words filter, either as a udf or a cfc. > Something that can evaluate any textfield and replace or remove any bad > words. Thank you in advance!! > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272387 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

