[Zope-DB] sqlvar tag for text

Eric Kamm eric@analyticinnovations.com
Mon, 24 Feb 2003 16:45:18 -0600


I have some Zope work where I leave newlines, etcetera intact and
haven't gotten into a situation where I wasn't preserving the
original form of the data.

Are you sure <dtml-sqlvar foo type=string> is a problem?  Maybe
you are losing your formatting when you are rendering the field
later.  Maybe you've already verified this is not the case by
inspecting the contents of your RDB.  There's also the question
of the wrap attribute you set on your HTML textarea tag (I believe
this can remove your carriage returns).

A reproducable example would help people figure out what the
issue really is.  

"guestbooks, bulletin boards, application forms, news systems...
Anything which requires you to use more than 1 line of text (and
keep formatting in tact)"

This gives us a hint, but I think lots of people haven't had your
problem doing the same things.

Best of luck to you!


Eric Kamm
Analytic Innovations, LLC


-----Original Message-----
From: zope-db-admin@zope.org [mailto:zope-db-admin@zope.org]On Behalf Of
Alex Cowan
Sent: Monday, February 24, 2003 4:24 PM
To: Fernando Martins; zope-db@zope.org
Subject: Re: [Zope-DB] sqlvar tag for text


Sorry that some of you will get this twice (I did reply to instead of reply
to all)

I can provide several

guestbooks, bulletin boards, application forms, news systems

Anything which requires you to use more than 1 line of text (and keep
formatting in tact).

As a reply to the next email this isn't an entirely new tag, its a minor
extension on an existing tag. The current tag (using string type) strips all
formatting (and doesn't save \n etc). The standard dtml-var tag doesn't
handle " and ' correctly since in an sql method you need to use
'<dtml-sqlvar foo>' for text.

As a reply to Jim Penney:
Doesn't help in cases where I want to keep " instead of '

Alex


----- Original Message -----
From: "Fernando Martins" <fmartins@hetnet.nl>
To: <zope-db@zope.org>
Sent: Monday, February 24, 2003 10:55 PM
Subject: RE: [Zope-DB] sqlvar tag for text


> > Alex Cowan wrote:
> > I was wondering if anyone has a good suggestion on where to submit the
> > change? I can't imagine it would be just me that wants this as its
useful
> > for lots of database stuff ;)
> >
>
> Could you provide and example, please?
>
> Fernando
>
> _______________________________________________
> Zope-DB mailing list
> Zope-DB@zope.org
> http://mail.zope.org/mailman/listinfo/zope-db
>


_______________________________________________
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db