[Zope] Textareas and SQL (Gadfly)

Jim Sanford jsanford@atinucleus.com
Tue, 8 Feb 2000 11:52:23 -0600


odbc to a VisualFoxPro table doesn't like the line feeds, but CRs are ok

Could use this complementary pieces of dtml for Gadfly to save and retrieve a variable with embedded CRs and LFs:

<dtml-sqlvar "_.string.replace(_.string.replace(dtml_variable,_.chr(13),'<CR>'),_.chr(10),'<LF>')" type=string>
and
<dtml-var "_.string.replace(_.string.replace(gadfly_field,'<CR>',_.chr(13)),'<LF>',_.chr(10))">


----- Original Message ----- 
From: Itamar Shtull-Trauring <itamars@ibm.net>
To: <zope@zope.org>
Cc: Jim Sanford <jsanford@atinucleus.com>
Sent: Tuesday, February 08, 2000 10:44 AM
Subject: Re: [Zope] Textareas and SQL (Gadfly)


Jim Sanford wrote:

> is that gadfly can't handle carriage
> returns and line feeds in the string input. (Which is why I
> was trying things like "virtual" to perhaps get rid of them.)

This is a bug in Gadfly.  If DC ever had time to read the Collector it
might've been in by now.  I'm eagerly awaiting the day when they start
handing out parts of Zope to the public.  Or at the very least make a list
of people who's patches are always read.

You can fix it by replacing
charstre = "'[^\n']*'"
with
charstre = "'[^']*'"

in lib/python/Products/ZGadflyDA/gadfly/sqlgen.py

-- 
Itamar S.T.  itamars@ibm.net