X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/b884cbd00ffe5f789c21ef7d563603512d141c67..4cae94b9fa4892e558160c5d55779064ff4a7add:/doc/bugs/No_link_for_blog_items_when_filename_contains_a_colon.mdwn 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..bb3f92f9c 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 @@ -38,24 +38,39 @@ At the moment I see two possible solutions: +++ IkiWiki.pm 2008-07-21 20:41:35.000000000 +0200 @@ -477,13 +477,13 @@ - sub titlepage ($) { #{{{ + sub titlepage ($) { my $title=shift; - $title=~s/([^-[:alnum:]:+\/.])/$1 eq ' ' ? '_' : "__".ord($1)."__"/eg; + $title=~s/([^-[:alnum:]+\/.])/$1 eq ' ' ? '_' : "__".ord($1)."__"/eg; return $title; - } #}}} + } - sub linkpage ($) { #{{{ + sub linkpage ($) { my $link=shift; - $link=~s/([^-[:alnum:]:+\/._])/$1 eq ' ' ? '_' : "__".ord($1)."__"/eg; + $link=~s/([^-[:alnum:]+\/._])/$1 eq ' ' ? '_' : "__".ord($1)."__"/eg; return $link; - } #}}} + } 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]] + +>> Hmm, did you fix it now in 2.54? If so, I suspect there is still one little case left (might well be the last one, +>> at least I hope so ;-) ): I just created a test post in the sandbox here: [[sandbox/test: with a colon in its name]] +>> (btw, why doesn't this get a hyperlink here?). +>> +>>> Because wikilinks cannot have spaces, convert to underscores. +>>> --[[Joey]] +>> +>> As it is put in the list of blog posts as a relative link, it starts +>> with `` -- this makes the browser think that "test" is a protocol specification which is to replace `http`, +>> so it complains (at least Opera and Firefox/Iceweasel on my Debian Etch do). What I described above for subpages +>> with this name pattern also still happens on my local install (ikiwiki 2.54 on Debian Etch), but this is basically +>> the same problem. +>> +>> I think the cleanest solution would be to quote colons in page names (like it is currently done for slashes)? +>> Starting the links with "`./`", as I proposed above, now seems a bit ugly to me... --Mathias + +>>> No, it's all [[done]] in 2.55. --[[Joey]]