Really fix bug with links to pages with names containing colons

Previous fix mised a few cases.
master
Joey Hess 2008-07-21 17:26:54 -04:00
parent c323a51efb
commit c2ffd205f3
3 changed files with 7 additions and 6 deletions

View File

@ -538,7 +538,7 @@ sub beautify_urlpath ($) { #{{{
# Ensure url is not an empty link, and
# if it's relative, make that explicit to avoid colon confusion.
if ($url !~ /\//) {
if ($url !~ /^\//) {
$url="./$url";
}

2
debian/changelog vendored
View File

@ -5,6 +5,8 @@ ikiwiki (2.55) UNRELEASED; urgency=low
* editpage: Don't show attachments link when attachments are disabled.
* tag: Allow tagbase to be overridden by starting a tag with "./" or "/".
(Simon McVittie)
* Really fix bug with links to pages with names containing colons.
Previous fix mised a few cases.
-- Joey Hess <joeyh@debian.org> Mon, 21 Jul 2008 11:35:46 -0400

View File

@ -54,8 +54,7 @@ At the moment I see two possible solutions:
What do you think about that? Does the patch have any side-effects I didn't see?
> What version of ikiwiki are you seeing it with? I fixed another
> colon-bug in version 2.53; you'd need to rebuild any affected wikis to
> get the fix. The relevant code is in `beautify_urlpath`, where it adds
> "./" in front of every relative url. An example of it working in this
> very wiki is a link to [[colon:problem]] --[[Joey]]
> I almost really fixed this in 2.53, but missed one case. All fixed now
> AFAICS. --[[Joey]]
[[tag done]]