You are viewing a plain text version of this content. The canonical link for it is here.
Posted to asp@perl.apache.org by Joshua Chamas <jo...@chamas.com> on 2001/09/19 21:44:02 UTC

Re: asp Digest of: get.298

> Is there a reason I'm missing that <script></script> tags are removed
> from subroutines in the global.asa (.asp files are fine, though) ?
> I am generating a JavaScript functon dynamically from multiple pages and
> 
> wanted to avoid the multiple same-name subroutines problem, so I
> commented out the regex in ASP.pm, but can't help but wonder what it's
> doing there in the first place...
> 
> Regards,
> Thanos Chatziathanassiou

Sorry for never responding to this, looks like my ISP bounced
this & it never got to me until just now, when the asp list
told me about this!

For portability with PerlScript & IIS, <script> tags are 
removed from global.asa before compiling as a perl module.  
Unfortunately, the parsing method used rips all <script> tags 
out, even if in a subroutine trying to print them!

    $code =~ s/\<\/?script?.*?\>/\#script tag removed here/igs;

If you are interested in my trying, I could attempt to make
this regexp nicer about where the <script> tags are removed from,
namely outside perl subroutines.

--Josh

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org