Subject: | marked_sections with text ending in square bracket parses wrong |
When processing a document with "marked_sections => 1", and the text
ends in a square bracket, the chunk is parsed wrong:
====== cut here ======
#!/usr/bin/perl -w
use strict;
my $text;
use HTML::Parser ();
my $p = HTML::Parser->new(text_h => [sub { $text .= shift }, "dtext"],
marked_sections => 1,
);
use Test::More tests => 1;
$p->parse("<![CDATA[foo [1]]]>");
is($text, "foo [1]", "CDATA text ending in square bracket");
====== cut here ======
Above tested in version 3.48.