]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
Really fix bug with links to pages with names containing colons
authorJoey Hess <joey@kodama.kitenet.net>
Tue, 26 Aug 2008 16:39:02 +0000 (12:39 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Tue, 26 Aug 2008 16:39:02 +0000 (12:39 -0400)
Previous fix mised a few cases.
(cherry picked from commit c2ffd205f3301a9fe6b5949a88da770899642589)

IkiWiki.pm
debian/changelog
doc/bugs/No_link_for_blog_items_when_filename_contains_a_colon.mdwn [deleted file]

index 4de8f71d6ce60743de22d0ea9efaeeb875de5999..0b576b32f886046d6648071dc1fdb6d5cc95d170 100644 (file)
@@ -541,7 +541,7 @@ sub beautify_url ($) { #{{{
 
        # 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";
        }
 
index 16f32863d7f711ea3928cdd53ca6ec046b68de30..aff2ed774b983e612a93ca5f6b7c952ac6b73277 100644 (file)
@@ -1,7 +1,5 @@
-ikiwiki (2.54) UNRELEASED; urgency=low
+ikiwiki (2.53.1) UNRELEASED; urgency=low
 
-  * Fix uninitialised value warning from a [[!foo]] preprocessor directive
-    with no whitespace.
   * ikiwiki-transition: Fix command-line processing so the prefix_directives
     transition works again.
   * Fixes creation of pages when clicking on WikiLinks starting with "/".
@@ -17,6 +15,8 @@ ikiwiki (2.54) UNRELEASED; urgency=low
     (Rebuilding the wiki on upgrade to this version is recommended if you use the
     search plugin.)
   * meta: fix title() PageSpec
+  * Really fix bug with links to pages with names containing colons. 
+    Previous fix mised a few cases.
 
  -- Josh Triplett <josh@freedesktop.org>  Wed, 09 Jul 2008 21:30:33 -0700
 
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
deleted file mode 100644 (file)
index ac6d6db..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-Since upgrading from Ikiwiki 2.20 to 2.32.3 (from Debian Lenny), I don't get hyperlinks to items which have a colon in their name anymore. This applies to both the normal and the archive view. Before the update, the links have been created as relative links, so they weren't usable either as the browser tried to take the part before the colon as protocol specification (as in e.g. `http:`). Iirc, this applied to the archive view only, links in the normal view were ok (will check this out again if it's important). Is there a way to quote each colon as %xy in the hyperlinks? Perhaps it's only a problem with my config, and not an actual bug...?
-
-EDIT: I just found that in this wiki under <http://ikiwiki.info/bugs/done/> the entry "mailto: links not properly generated in rss/atom feeds" also doesn't have a hyperlink - at least it's not a problem with my config only ;-)
-
-[[madduck]]: I traced this down to `htmlscrubber`. If disabled, it works. If
-enabled, then `$safe_url_regexp` determines the URL unsafe because of the
-colon and hence removes the `src` attribute.
-
-Digging into this, I find that [[rfc 3986]] pretty much discourages colons in
-filenames:
-
-> A path segment that contains a colon character (e.g., "this:that") cannot be
-> used as the first segment of a relative-path reference, as it would be
-> mistaken for a scheme name.  Such a segment must be preceded by
-> a dot-segment (e.g., "./this:that") to make a relative- path reference.
-
-The solution seems not to use colons.
-
-In any case, `htmlscrubber` should get a new regexp, courtesy of dato:
-`[^:]+($|\/)`. I have tested and verified this.
-
-[Commit/patch
-be0b4f60](http://git.madduck.net/v/code/ikiwiki.git?a=commit;h=be0b4f603f918444b906e42825908ddac78b7073) fixes this.
-
-[[done]]