[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    RE: HTML::Embperl strangeness
From:       "G.Richter" <richter () ecos ! de>
Date:       1998-12-30 10:15:00
[Download RAW message or body]

>
>
>
> 	I'm getting wierd behavior from s///ge under Embperl.  If I run
> the almost exact same script as my .epl page I get the correct output:
>

[..]


>     s{(\s\d|\b\d{2})\b}{
>       if( $dates{sprintf "%02d", $1} ) {
> 	sprintf qq{<a href="foo%02d.gif">$1</a>}, $1;


Looks like an escaping/unescaping problem to me. Embperl remove html tags
from the perl source to be compatible with high level html editor. You may
write

 	sprintf qq{\<a href="foo%02d.gif"\>$1\</a\>}, $1;

or

 	sprintf qq{&lt;a href="foo%02d.gif"&gt;$1&lt;/a&gt;}, $1;

or if you are writing in an ascii editor and not an high level html editor
set the optRawInput option, this will avoid removing html tags from the perl
source at all. Refer to the docs (Inside Embperl) or the FAQ for more
details.

If this does not solve your problem let me know

Gerald

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic