At 9:59 AM +1000 5/24/02, Angus Lees wrote:
>At Thu, 23 May 2002 09:59:11 -0400, Kee Hinckley wrote:
>> At 9:12 PM -0700 5/22/02, [EMAIL PROTECTED] wrote:
>> >On Wed, 22 May 2002 13:11:27 -0400 Kee Hinckley said:
>> >> This <a href="[- foo(\%fdat) -]"> passes the first element of
>> >
>> >I assume you meant <a href="[+ foo (\%fdat) +]"> ?
>>
>> It doesn't matter to the issue, but actually no. In this case I need
>> to output a URL, which means I need to do my own escaping, which
>> means i need to print to OUT rather than make use of the return
>> value. (Be nice to have a way to get around that.)
>
>err.. from HTML::Embperl(3pm):
>
> $escmode
>
> Turn HTML and URL escaping on and off. The default is on
> ($escmode = 3).
Yes, and $escmode is what I use, but it doesn't work well inline.
Given the choice of writing:
[$ var $oescmode $]
[- $oescmode = $escmode; $escmode = 0; -]
<a href="[+ $unescapedstring +]">[- $escmode = $oescmode -][+
$foo +]</a>
or putting it all in a function
<a href="[- printunescaped($string) -]">[+ $foo +]</a>
I'll go for the latter. What printunescaped does of course is just
what I did above, but it's a lot cleaner.
--
Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]