You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Matt Ho <ma...@indigoegg.com> on 2003/02/17 19:36:13 UTC

how do you escape a "

is there a way to write the following without create a $quote param?

#set( $quote = '"' )
#set( $err =
$stack.findValue("getError(${quote}$tag.getName()${quote})") )

--
Matt Ho
Principal
Indigo Egg, Inc.
http://www.indigoegg.com/




---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


RE: how do you escape a "

Posted by Matt Ho <ma...@indigoegg.com>.
Gotcha!  Thanks :)

--
Matt Ho
Principal
Indigo Egg, Inc.
http://www.indigoegg.com/


> -----Original Message-----
> From: Nathan Bubna [mailto:nathan@esha.com]
> Sent: Monday, February 17, 2003 11:03 AM
> To: Velocity Users List
> Subject: Re: how do you escape a "
> 
> Matt said:
> > is there a way to write the following without create a $quote param?
> >
> > #set( $quote = '"' )
> > #set( $err =
> > $stack.findValue("getError(${quote}$tag.getName()${quote})") )
> 
> not in 1.3.x
> 
> but i believe quote escaping was implemented in 1.4-dev as "":
> 
> #set( $err = $stack.findValue("getError(""$tag.name"")") )
> 
> Nathan Bubna
> nathan@esha.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Re: how do you escape a "

Posted by Nathan Bubna <na...@esha.com>.
Matt said:
> is there a way to write the following without create a $quote param?
> 
> #set( $quote = '"' )
> #set( $err =
> $stack.findValue("getError(${quote}$tag.getName()${quote})") )

not in 1.3.x

but i believe quote escaping was implemented in 1.4-dev as "":

#set( $err = $stack.findValue("getError(""$tag.name"")") )

Nathan Bubna
nathan@esha.com


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org