]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
Merge branch 'master' of ssh://git.kitenet.net/srv/git/ikiwiki.info
authorJoey Hess <joey@kitenet.net>
Sat, 22 Dec 2007 18:36:24 +0000 (13:36 -0500)
committerJoey Hess <joey@kitenet.net>
Sat, 22 Dec 2007 18:36:24 +0000 (13:36 -0500)
IkiWiki/Plugin/meta.pm
debian/changelog
doc/plugins/meta.mdwn
doc/security.mdwn

index 8555e1109b76afaf585daa6ec95ee261edbd0036..987262a48c6961bed98b480e5466614b0588d5dc 100644 (file)
@@ -108,13 +108,16 @@ sub preprocess (@) { #{{{
                return "" if $page ne $destpage;
                my $safe=0;
                if ($value !~ /^\w+:\/\//) {
-                       add_depends($page, $value);
-                       my $link=bestlink($page, $value);
+                       my ($redir_page, $redir_anchor) = split /\#/, $value;
+
+                       add_depends($page, $redir_page);
+                       my $link=bestlink($page, $redir_page);
                        if (! length $link) {
                                return "[[meta ".gettext("redir page not found")."]]";
                        }
 
                        $value=urlto($link, $page);
+                       $value.='#'.$redir_anchor if defined $redir_anchor;
                        $safe=1;
 
                        # redir cycle detection
index 75462b6f96429211fcfd01970ae60b8c23e849f9..8d91bd95cd7996984366c982be32528d8981fcd4 100644 (file)
@@ -1,6 +1,7 @@
 ikiwiki (2.17) UNRELEASED; urgency=low
 
   * Improved parentlinks special case for index pages.
+  * redir: Support for specifying anchors.
 
  -- Joey Hess <joeyh@debian.org>  Wed, 19 Dec 2007 16:39:07 -0500
 
index 0696dc08eb9ac40c4ea81b55a07910584ea60c03..479d62c434034262e000a01f843079b49a2d89e8 100644 (file)
@@ -85,6 +85,9 @@ Supported fields:
   However, this latter syntax won't be allowed if the [[htmlscrubber]] is
   enabled, since it can be used to insert unsafe content.
 
+  For both cases, an anchor to jump to inside the destination page may also be
+  specified using the common `PAGE#ANCHOR` syntax.
+
 If the field is not one of the above predefined fields, the metadata will be
 written to the generated html page as a &lt;meta&gt; header. However, this
 won't be allowed if the [[htmlscrubber]] is enabled, since it can be used to
index 6e1d56a52e76c92a50a6a48d66293f5b3a3022d4..c51cd5b953727c6aa900c483bf616b6e321e3687 100644 (file)
@@ -341,7 +341,7 @@ There are at least two configurations where this is exploitable:
   notice.
 
 This security hole was discovered on 26 November 2007 and fixed the same
-da with the release of ikiwiki 2.14. I recommend upgrading to this version
+day with the release of ikiwiki 2.14. I recommend upgrading to this version
 if your wiki can be committed to by third parties. Alternatively, don't use
 a trailing slash in the srcdir, and avoid the (unusual) configurations that
 allow the security hole to be exploited.