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( @_ );
  }


Then you'd have 

<b><%=e($story->title)%></b><br>
by <%=e($story->author->name)%><br>
<%=e($story->description)%>


I found most of the time I don't need to enocde the strings when I output them... but 
I guess there's always the 1% of fields that actually 
have a "<" characeter in them...


HTH
Ellers



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

Reply via email to