Skip Menu |

This queue is for tickets about the XML-SAX CPAN distribution.

Report information
The Basics
Id: 43174
Status: new
Priority: 0/
Queue: XML-SAX

Owner: Nobody in particular
Requestors: h.schiemann [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: Bug XML/SAX/, sub CDSect
Date: Tue, 10 Feb 2009 11:07:48 +0100
To: bug-XML-SAX [...]
From: Herbert Schiemann <h.schiemann [...]>
Download (untitled) / with headers
text/plain 1.1k
Hello, I have to fix my last message. The test for EOF should be modified as shown. I'm using XML-SAX-0.96. sub CDSect in file XML/SAX/ should be like sub CDSect { my ($self, $reader) = @_; my $data = $reader->data(9); return 0 unless $data =~ /^<!\[CDATA\[/; $reader->move_along(9); $self->start_cdata({}); my $chars; while (1) { # do not miss "]]>", so try to read at least 3 chars $data = $reader->data(3); $self->parser_error ("EOF looking for CDATA section end", $reader) unless length($data) >= 3; if ($data =~ /^(.*?)\]\]>/s) { $chars = $1; $reader->move_along(length($chars) + 3); $self->characters({Data => $chars}); last; } else { # the last one or two "]" could be the beginning of a "]]>", # so do no eat them $data =~ /^(.*?)\]{0,2}+$/s; $chars = $1; $reader->move_along(length($chars)); $self->characters({Data => $chars}); } } $self->end_cdata({}); return 1; } Regards, Herbert

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to