diff options
author | Mathias <Mathias@web> | 2008-07-21 16:04:17 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2008-07-21 16:04:17 -0400 |
commit | 652beaf48c64d5dd10cb0e0702f1fb284c96177a (patch) | |
tree | 92b15c0997d6b62736d87cae4ec6642bece7d2d3 /doc/bugs | |
parent | 8fbe201bb379e46c4285be5c07eb1247a8639d96 (diff) |
Diffstat (limited to 'doc/bugs')
-rw-r--r-- | doc/bugs/No_link_for_blog_items_when_filename_contains_a_colon.mdwn | 32 |
1 files changed, 31 insertions, 1 deletions
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 608d09b74..11463d770 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 @@ -22,4 +22,34 @@ In any case, `htmlscrubber` should get a new regexp, courtesy of dato: [Commit/patch be0b4f60](http://git.madduck.net/v/code/ikiwiki.git?a=commit;h=be0b4f603f918444b906e42825908ddac78b7073) fixes this. -[[done]] + +**July 21 2008:** I update this bug report as it still seems to be an issue: E.g. when creating a subpage whose name contains +a colon by inserting an appropriate wikilink in the parent page: the new page can be created using that link, but afterwards +there won't be a link to this page. Like madduck said above it seems to be htmlscrubber removing this link. However everything +works fine if the same page is being linked to from another subpage because in that case the resulting link starts with `../`. + +At the moment I see two possible solutions: + +1. let all relative links at least start with `./`. I haven't tested this. + +2. Escape the colon in page titles. I created the following patch which worked for me: + + --- IkiWiki.pm.2.53-save 2008-07-08 15:56:38.000000000 +0200 + +++ IkiWiki.pm 2008-07-21 20:41:35.000000000 +0200 + @@ -477,13 +477,13 @@ + + 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 ($) { #{{{ + 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? |