[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]
Re: BUG REPORT: Website META Language 2.0.1 (23-May-2000)
- From: Howard Alexander LaHurreau <nospam@thanx>
- Date: Tue, 23 May 2000 18:57:22 -0500
On Wed, May 24, 2000 at 12:46:10AM +0200, Denis Barbier wrote:
> On Tue, 23 May 2000, Howard Alexander LaHurreau wrote:
> > PROBLEM DESCRIPTION:
> > I'm having problems with the migration from 2.0.0 to 2.0.1.
> > It appears that when mp4h reaches an unknown tag, it treats
> > it as if it had been defined with whitespace=delete.
> No, it parses attributes and writes them in a space separated list.
Ahh. That explains why it does that. :-)
> > The problem I'm having with this is that this code:
> > ---------------8< cut here 8<---------------
> > print <<"END IMGLINK";
> > <a href="$rss->{'image'}->{'link'}"><img src="$rss->{'image'}->{'url'}"
> > alt="$rss->{'image'}->{'title'}" border="0" align="right"
> > END IMGLINK
> > print " width=\"$rss->{'image'}->{'width'}\""
> > if $rss->{'image'}->{'width'};
> > print " height=\"$rss->{'image'}->{'height'}\""
> > if $rss->{'image'}->{'height'};
> > print " /></a>\n";
> > ---------------8< cut here 8<---------------
> Let me try to explain what happens:
> Input Interpretation
> print string
> << these < delimiters can not begin a tag, because they
> are followed by invalid characters (resp. < and ")
> "END IMGLINK"; string
> <a beginning of an undefined tag. We are looking for
> attributes and a right angle bracket.
> href="$rss->{'image'}->{'link'}" first attribute
> > end of unknown tag
> <img beginning of an undefined tag. Below is the list of
> attributes:
> 1 src="$rss->{'image'}->{'url'}"
> 2 alt="$rss->{'image'}->{'title'}"
> 3 border="0"
> 4 align="right"
> 5 END IMGLINK
> 6 print
> 7 " width=\"$rss->{'image'}->{'width'}\""
> 8 if
> 9 $rss-
> > end of unknown tag (img)
>
> {'image'}->{'width'}; string, etc.
The question that I have is should MP4H be playing with the whitespace
inside the unknown tag? (Or is there any way to prevent it from doing
so?)
> > gets turned into this code:
> > ---------------8< cut here 8<---------------
> > print <<"END IMGLINK";
> > <a href="$rss->{'image'}->{'link'}"><img src="$rss->{'image'}->{'url'}" alt="$rss->{'image'}->{'title'}" border="0" align="right" END IMGLINK print
" width="$rss->{'image'}->{'width'}"" if $rss->{'image'}->{'width'};
> > print " height=\"$rss->{'image'}->{'height'}\""
> > if $rss->{'image'}->{'height'};
> > print " /></a>\n";
> > ---------------8< cut here 8<---------------
> Indeed concatenate attributes of the img tag and you obtain the code
> above. The solution is to prevent parsing <img> tag, e.g. with
> print <<"END IMGLINK";
> <a href="$rss->{'image'}->{'link'}"><<suck>img src="$rss->{'image'}->{'url'}"
> alt="$rss->{'image'}->{'title'}" border="0" align="right"
> END IMGLINK
> The <suck> tag prevents scanning by mp4h, and is automatically removed
> in pass 8.
> Another solution is to enclose your ePerl code with
> <protect pass=2>...</protect> whenever possible.
OK, thanks for your help. :-)
--
AlexDW <alexdw@locl.net> -- KB9SYM -- DOCTOR WHO FOREVER
Pecor's Health-Food Principle:
Never eat rutabaga on any day of the week that has a "y" in it.
Visit The Home of AlexDW at http://www.locl.net/homes/alexdw/
______________________________________________________________________
Website META Language (WML) www.engelschall.com/sw/wml/
Official Support Mailing List sw-wml@engelschall.com
Automated List Manager majordomo@engelschall.com