You could also do something like:
#set($catLink = $emptyString.concat("<a
href=").concat('"').concat($linkStr).concat("'").concat(">$category.Name</a>"))
Of course you need to set $emptyString to the emtpy string in your
context. Not as pretty, but it works.
Warner Onstine wrote:
>Awesome, thanks!
>
>-warner
>
>----- Original Message -----
>From: "Jon Stevens" <[EMAIL PROTECTED]>
>To: "velocity-dev" <[EMAIL PROTECTED]>
>Sent: Friday, July 20, 2001 5:31 PM
>Subject: Re: escaping characters
>
>
>>on 7/20/01 5:30 PM, "Warner Onstine" <[EMAIL PROTECTED]> wrote:
>>
>>>Hi all,
>>>I'm just hoping there's a better solution to this. I am trying to do
>>>
>this:
>
>>>#set ($catLink = "<a href='$linkStr'>$category.Name</a>")
>>>
>>>But, I don't want the href to contain single quotes, but instead double
>>>quotes. I've looked through the docs and haven't found anything related
>>>
>to
>
>>>this.
>>>
>>>Everything that I've tried so far has either resulted in a bad link or
>>>
>an
>
>>>error, any help would be appreciated.
>>>
>>>-warner
>>>
>>#macro ( link $name $value )<a href="$value">$name</a>#end
>>
>>#set ($catLink = "#link($category.Name $linkStr)")
>>
>>Or, if you are using Turbine, just use $link
>>
>>-jon
>>
>>
--
Patrick E. Whitesell
[EMAIL PROTECTED]
***************************************
This e-mail message may contain confidential and/or legally privileged information. If
you are not the intended recipient(s), or the employee or agent responsible for
delivery of this message to the intended recipient(s), you are hereby notified that
any dissemination, distribution or copying of this e-mail message is strictly
prohibited.If you have received this message in error, please immediately notify the
sender and delete this e-mail message from your computer. DO NOT FORWARD THIS E-MAIL
MESSAGE WITHOUT THE PERMISSION OF THE SENDER.