Aug 19, 2013; 09:49
jordon
Zapping Gremlins
Hello List,
I have a client who is experiencing an issue with cut-and-paste
gremlins on their website.
The site operates bilingually (french/english) and handles all sorts
of user inputted data. This data, naturally, includes people cutting
and pasting from word files into form textarea fields.
Does anybody have a reliable method for:
a)Catching and converting "gremlin" chars, like curly quotes(single
and double) or em dashes to non-gremlin utf-8 chars for safe storage
in a mysql text field.
b)an sql statement that would reliably update gremlin characters which
are already stored in the database.
My best option so far for stopping them on the way in is to clean the
form input string by first encoding it via encode_smart then passing
it through Bill Corey's lp_sting_zap tag. (I use the encode_smart to
preserve accents, and any oddball characters that it can catch.)
This method works for my new cote fairly well, however the client has
a very old pageblocks based system, and would have to invest a lot of
time in updating their output code to handle the HTML encoded entities
that encode_smart creates.
(Although, it might not be too hard to revert those entities back to
their utf-8 equivalents after the cleaning process prior to the save.
Does that sound viable?)
Thanks in advance,
Jordon Davidson
#############################################################
Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013
#############################################################
This message is sent to you because you are subscribed to
the mailing list Lasso
Lasso@lists.lassosoft.com
To unsubscribe, E-mail to: <Lasso-unsubscribe@lists.lassosoft.com>
Send administrative queries to <Lasso-request@lists.lassosoft.com>