Author: Brett Wuth Last-Update: 2013-07-08 Bug-Debian: https://bugs.debian.org/715417 Description: Fix reading page headline from mediawiki 1.19.5 --- a/lib/WWW/Mediawiki/Client.pm +++ b/lib/WWW/Mediawiki/Client.pm @@ -1260,7 +1260,7 @@ sub get_server_page { res => $res, ) if ($headline); WWW::Mediawiki::Client::ServerPageException->throw( - error => "Could not identify the error in this context.", + error => "Could not find page headline.", res => $res, ); } @@ -1493,10 +1493,14 @@ sub _get_server_encoding { } sub _get_page_headline { + # Find and parse the page's headline. + # the headline may be of the form: + #

Editing Template:Access Logged/Demo/Access Log

+ my ($self, $doc) = @_; my $p = HTML::TokeParser->new(\$doc); $p->get_tag("h1"); - my $text = $p->get_text; + my $text = $p->get_text( "/h1" ); $text =~ s/ //gs; # convert endlines return $text; }