Skip Menu |

This queue is for tickets about the WWW-Mediawiki-Client CPAN distribution.

Report information
The Basics
Id: 19454
Status: resolved
Priority: 0/
Queue: WWW-Mediawiki-Client

People
Owner: Nobody in particular
Requestors: stuart.caie [...] gmail.com
Cc:
AdminCc:

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



Subject: mvs fails on article names with regexp metacharacters
When updating or retrieving articles whose titles have regexp metacharacters, WWW::Mediawiki::Client will throw a ServerPageException with the type "The server could not resolve the page name $pagename, but responded that it was 'Editing $pagename'." I have attached a patch, but the fix is simply to change /$expected$/ to /\Q$expected\E$/ on line 1197
Subject: mvs_page_title_fix.patch
--- /root/.cpan/build/WWW-Mediawiki-Client-0.28/lib/WWW/Mediawiki/Client.pm 2005-11-18 17:16:02.000000000 +0000 +++ /usr/local/share/perl/5.8.7/WWW/Mediawiki/Client.pm 2006-05-23 23:25:00.000000000 +0100 @@ -1194,7 +1194,7 @@ $self->{edit}->{def_minor} = $self->_get_edit_minor_default($doc); my $headline = Encode::encode("utf8", $self->_get_page_headline($doc)); my $expected = lc $pagename; - unless (lc($headline) =~ /$expected$/) { + unless (lc($headline) =~ /\Q$expected\E$/) { WWW::Mediawiki::Client::ServerPageException->throw( error => "The server could not resolve the page name '$pagename', but responded that it was '$headline'.",
On Tue May 23 18:35:35 2006, guest wrote: Show quoted text
> When updating or retrieving articles whose titles have regexp > metacharacters, WWW::Mediawiki::Client will throw a
ServerPageException Show quoted text
> with the type "The server could not resolve the page name $pagename,
but Show quoted text
> responded that it was 'Editing $pagename'." > > I have attached a patch, but the fix is simply to
change /$expected$/ to Show quoted text
> /\Q$expected\E$/ on line 1197
Thanks for the patch. I'm working on the project again today or so. -mark
Thanks again. The new version fixes this. --mark