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'.",