Skip Menu |

This queue is for tickets about the HTML-BBCode CPAN distribution.

Report information
The Basics
Id: 12036
Status: resolved
Priority: 0/
Queue: HTML-BBCode

People
Owner: blom [...] cpan.org
Requestors: LIOL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.01
Fixed in: 1.02



Subject: Incorrect work with limited set of tags
I found that module works wrong if I use limited list of tags and unallowed tag meets first in parsed text. Example below #!/usr/bin/perl use strict; use HTML::BBCode; my $p1 = new HTML::BBCode({ allowed_tags => [ qw( b i u img ) ] }); my $p2 = new HTML::BBCode({ allowed_tags => [ qw( b i u ) ] }); my $text1 = <<"EOB"; [img=http://phpbb.com/logo.gif]phpBB logo[/img] [b]BBCode[/b] - is a simple [i]markup language[/i] used in [url=http://phpbb.com/]phpBB[/url]. EOB my $text2 = <<"EOB"; [b]BBCode[/b] - is a simple [i]markup language[/i] used in [url=http://phpbb.com/]phpBB[/url]. [img=http://phpbb.com/logo.gif]phpBB logo[/img] EOB print "1st parser 1 text\n", $p1->parse( $text1 ), "\n"; print "2nd parser 1 text (wrong)\n", $p2->parse( $text1 ), "\n"; print "1st parser 2 text\n", $p1->parse( $text2 ), "\n"; print "2nd parser 2 text\n", $p2->parse( $text2 ), "\n";
Patched, new version uploaded to CPAN (1.02) -- B10m