cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@s-und-n.de>
Subject RE: [BUG] JXTG/JXTT eats backslashes
Date Wed, 11 Aug 2004 09:30:07 GMT
 
Antonio Gallardo wrote:
> 
> Hi Carsten:
> 
> I am not sure why we escape the chars in this way. I think it 
> is part of the jexl convention, but don't believe me.
> 
Hmm, what do you exactly mean? The chars are not escaped, but
the backslash is simply removed.
Or do you mean that e.g. jexl would fail if a backslash
is in an expression?

Carsten

> 
> Carsten Ziegeler dijo:
> > I just found another "nice feature" of the JXTG/JXTT. It eats 
> > backslashed out of your text! For example, if you read this 
> XML by the 
> > JXTG:
> >
> > <txt>\ha\llo</txt>
> >
> > The resulting XML is:
> >
> > <txt>hallo</txt>
> >
> > This feature is very nice if you use forms with fields that can 
> > contain backslashed and you're running the JXTG after the forms 
> > transformer!
> >
> > Anyways, the TextEvent subclass has a special handling for 
> backslashes:
> > if (c == '\\') {
> >     ch = in.read();
> >     if (ch == -1) {
> >         buf.append('\\');
> >     } else {
> >         buf.append((char)ch);
> >     }
> > }
> >
> > I don't see any real sense in this (note that backslashes 
> at the end 
> > are not removed).
> >
> > If noone objects, I will remove this special handling.
> >
> > Carsten
> >
> > Carsten Ziegeler
> > Open Source Group, S&N AG
> > http://www.s-und-n.de
> > http://www.osoco.net/weblogs/rael/
> >
> 


Mime
View raw message