Henrik Tougaard wrote:
> 
> The resulting ASP code will then look soemwhat like this:
>   <INPUT type="text" name="arbst_navn" value="<%=
> $Server->HTMLEncode($arbst->{arbst_navn}) %>" tabindex="1">
> which is even more unreadable than before.
> 

If you created a subroutine in global.asa like:

sub encode { $Server->HTMLEncode(@_) }

Then this code could have looked like:

 <INPUT type="text" name="arbst_navn" value="<%= encode($arbst->{arbst_navn}) %>" 
tabindex="1">

> Therefore I would like to have a new tag [eg '<%-' but I am open (very open)
> for better suggestions] that automatically HTMLEncodes the text inside the

which is not much more typing than <%- %> ... I worry about starting
to add tag extensions to Apache::ASP because one of it virtues 
when compared to other environments is the simplicity in which
perl is embedded.

> It couldbe done with a XMLsub, but isn't that a bit overkill. Of course
> adding a
> new tag  could also be construed as overkill :)
> 

The XMLSub that I sent in the separate benchmarking email may
or may not be overkill ... you could call the tag something like
<encode:input /> or <input:escape /> if you like which might 
create a conscious effort on the part of you developer to use.

Also, you could consider using FormFill functionality,
where all you would have to do in the above example to 
set the input field is:

<% $Response->{Form}{arbst_navn} = $arbst->{arbst_navn}; %>

--Josh
_________________________________________________________________
Joshua Chamas                           Chamas Enterprises Inc.
NodeWorks Founder                       Huntington Beach, CA  USA 
http://www.nodeworks.com                1-714-625-4051

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

Reply via email to