Ellers wrote:
> 7/8/02 10:48:16 AM, Philip Mak <[EMAIL PROTECTED]> wrote:
> 
> 
>>Example:
>>
>><b><%=$Server->HTMLEncode($story->title)%></b><br>
>>by <%=$Server->HTMLEncode($story->author->name)%><br>
>><%=$Server->HTMLEncode($story->description)%>
>>
>>Writing all of that $Server->HTMLEncode() all the time gets to be a
>>bit tedious sometimes. How do other people deal with this?
> 
> 
> Really? Maybe I just don't use it very often...
> 
> You could add a function to your global.asa, e.g.
> 
>   sub e( )
>   {
>     return $Server->HTMLEncode( @_ );
>   }

I might also create an XMLSubs like

   <enc><%= $story->{title} %></enc>

so that the <enc /> tag does it for you defined like:

sub enc {
   my($attr, $html) = @_;
   print $main::Server->HTMLEncode($html);
}

--Josh
________________________________________________________________
Josh Chamas, Founder                   phone:714-625-4051
Chamas Enterprises Inc.                http://www.chamas.com
NodeWorks Link Checking                http://www.nodeworks.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to