From: Joey Hess Date: Mon, 21 Jul 2008 21:26:54 +0000 (-0400) Subject: Really fix bug with links to pages with names containing colons X-Git-Url: https://scripts.mit.edu/gitweb/www/ikiwiki.git/commitdiff_plain/c2ffd205f3301a9fe6b5949a88da770899642589?hp=c323a51efb3b43b8931c12f66e6ae142f1eb20ed Really fix bug with links to pages with names containing colons Previous fix mised a few cases. --- diff --git a/IkiWiki.pm b/IkiWiki.pm index 063cef8e0..c14124f79 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -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"; } diff --git a/debian/changelog b/debian/changelog index a54d797bd..86a770357 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Mon, 21 Jul 2008 11:35:46 -0400 diff --git a/doc/bugs/No_link_for_blog_items_when_filename_contains_a_colon.mdwn b/doc/bugs/No_link_for_blog_items_when_filename_contains_a_colon.mdwn index 78f6d6cac..313c1addd 100644 --- a/doc/bugs/No_link_for_blog_items_when_filename_contains_a_colon.mdwn +++ b/doc/bugs/No_link_for_blog_items_when_filename_contains_a_colon.mdwn @@ -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]]