[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]
Re: Another bug? [wml 2.0.6]
- From: Denis Barbier <nospam@thanx>
- Date: Mon, 18 Dec 2000 10:35:09 +0100
On Sun, Dec 17, 2000 at 02:01:57PM -0800, Ken McGlothlen wrote:
> I just don't understand this one. I've abridged the original files
> extensively, but this excerpt still shows the problem. This is in WML 2.0.6,
> of course.
[...]
> while( $body ) {
> if( $body =~ /^(<[^>]+>|[^a-z]+|&\w+;)(.*)$/ ) {
> # got a tag or non-lowercase characters or entities
> $result .= $1;
> $body = $2;
> } elsif( $body =~ /^([a-z]+)(.*)$/ ) {
> # got lowercase characters
> $result .= qq{<font size="$lcsize">} . uc( $1 ) . "</font>";
> $body = $2;
> }
> }
> return( $result );
[...]
> wml appears to go into an infinite loop.
And indeed, the loop above never breaks if $body begins with a character
other than '<' or a lowercase letter. Maybe you should add
} else {
$result .= $body;
$body = '';
--
Denis Barbier
WML Maintainer
______________________________________________________________________
Website META Language (WML) www.engelschall.com/sw/wml/
Official Support Mailing List sw-wml@engelschall.com
Automated List Manager majordomo@engelschall.com