]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Render.pm
fix
[ikiwiki.git] / IkiWiki / Render.pm
index 504edc843cc8d7e6693822659ac2477c39798d13..1fc047a62f78ed8b21d2cde47940363a65930d09 100644 (file)
@@ -9,8 +9,8 @@ sub linkify ($$) { #{{{
        my $page=shift;
 
        $content =~ s{(\\?)$config{wiki_link_regexp}}{
-               $2 ? ( $1 ? "[[$2|$3]]" : htmllink($page, $3, 0, 0, pagetitle($2)))
-                  : ( $1 ? "[[$3]]" :    htmllink($page, $3))
+               $2 ? ( $1 ? "[[$2|$3]]" : htmllink($page, titlepage($3), 0, 0, pagetitle($2)))
+                  : ( $1 ? "[[$3]]" :    htmllink($page, titlepage($3)))
        }eg;
        
        return $content;
@@ -186,7 +186,7 @@ sub postprocess_html_inline { #{{{
                $ret.=$template->output;
        }
        
-       return $ret;
+       return "</p>$ret<p>";
 } #}}}
 
 sub genpage ($$$) { #{{{
@@ -202,10 +202,10 @@ sub genpage ($$$) { #{{{
                filename => "$config{templatedir}/page.tmpl");
        
        if (length $config{cgiurl}) {
-               $template->param(editurl => "$config{cgiurl}?do=edit&page=$page");
-               $template->param(prefsurl => "$config{cgiurl}?do=prefs");
+               $template->param(editurl => cgiurl(do => "edit", page => $page));
+               $template->param(prefsurl => cgiurl(do => "prefs"));
                if ($config{rcs}) {
-                       $template->param(recentchangesurl => "$config{cgiurl}?do=recentchanges");
+                       $template->param(recentchangesurl => cgiurl(do => "recentchanges"));
                }
        }
 
@@ -325,7 +325,7 @@ sub findlinks ($$) { #{{{
 
        my @links;
        while ($content =~ /(?<!\\)$config{wiki_link_regexp}/g) {
-               push @links, lc($2);
+               push @links, titlepage($2);
        }
        # Discussion links are a special case since they're not in the text
        # of the page, but on its template.