> I'm using a custom tag, <CF_nocussing> which does a db
> lookup on an input
> field to remove inappropriate language. However, it works
> too well. A
> company called Asset Management, when they type in their
> name, it comes out
> as "***et Management". Same thing happens if someone keys
> in "password"
> (displays as "p***word")
> Are there other tags or regex's out there which would
> solve this problem?
> Thanks,
> Mark
If you have the source, change the replace() statement to a
rereplace() statement and use "(^|[[:space:]])(#word#)([[:space:]]|$)"
with "\1#repeatstring('*',len(word))#\3" as the replace string. That
will replace only whole words... Although as a rule of thumb, these
things don't work because anyone can type in any combination of spaces
and special characters in the middle of the word, i.e. d-a*m#n! ...
you get the idea... The one you got seems to be particularly poor as
there are a number of words it's liable to destroy, such as "the
Chronickles of Rid****" or for that matter, Tim Allen, who's real name
is Tim Dick... or "**** Cheney". Although to be honest, even if you
fix the problem you have now, you still won't get the vice president's
name on your site. It all just seems rather asinine to me. :)
s. isaac dealey 954.927.5117
new epoch : isn't it time for a change?
add features without fixtures with
the onTap open source framework
http://www.sys-con.com/story/?storyid=44477&DE=1
http://www.sys-con.com/story/?storyid=45569&DE=1
http://www.fusiontap.com
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

