goto: Support being passed a page title that is not a valid page name, to support several cases including mercurial's long user names on the RecentChanges page, and urls with spaces being handled by the 404 plugin.

master
Joey Hess 2009-06-06 02:36:40 -04:00
parent 07b61ec8b6
commit e40d2a6b2b
3 changed files with 12 additions and 0 deletions

View File

@ -32,6 +32,12 @@ sub cgi_goto ($;$) {
}
}
# It's possible that $page is not a valid page name;
# if so attempt to turn it into one.
if ($page !~ /$config{wiki_file_regexp}/) {
$page=titlepage($page);
}
IkiWiki::loadindex();
# If the page is internal (like a comment), see if it has a

4
debian/changelog vendored
View File

@ -14,6 +14,10 @@ ikiwiki (3.15) UNRELEASED; urgency=low
fails for any reason, disable it in the generated file.
Closes: 532001
* pagecount: Fix broken optimisation for * pagespec.
* goto: Support being passed a page title that is not a valid page
name, to support several cases including mercurial's long user
names on the RecentChanges page, and urls with spaces being handled
by the 404 plugin.
-- Joey Hess <joeyh@debian.org> Tue, 02 Jun 2009 17:03:41 -0400

View File

@ -20,4 +20,6 @@ pass it through titlepage if not.
with spaces" to "http://wiki/some_page_with_spaces", if the latter exists.
That seems like a fairly good thing.)
[[done]]
--[[Joey]]