]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Render.pm
Fix typo in Danish translation of shortcuts page that caused expoentional regexp blowup.
[ikiwiki.git] / IkiWiki / Render.pm
index 8e8336b994070f442061e8bc2929525a77033549..235efd299a3297d273691b369037398f77aa7153 100644 (file)
@@ -93,7 +93,7 @@ sub genpage ($$) {
        }
        if (defined $config{historyurl} && length $config{historyurl}) {
                my $u=$config{historyurl};
-               my $p=uri_escape_utf8($pagesources{$page});
+               my $p=uri_escape_utf8($pagesources{$page}, '^A-Za-z0-9\-\._~/');
                $u=~s/\[\[file\]\]/$p/g;
                $template->param(historyurl => $u);
                $actions++;
@@ -475,8 +475,18 @@ sub find_changed ($) {
                        $pagemtime{$page}=$stat[9];
 
                        if (isinternal($page)) {
+                               my $content = readfile($srcfile);
+
                                # Preprocess internal page in scan-only mode.
-                               preprocess($page, $page, readfile($srcfile), 1);
+                               preprocess($page, $page, $content, 1);
+
+                               run_hooks(scan => sub {
+                                       shift->(
+                                               page => $page,
+                                               content => $content,
+                                       );
+                               });
+
                                push @internal_changed, $file;
                        }
                        else {
@@ -766,6 +776,7 @@ sub refresh () {
        my $oldlink_targets=calculate_old_links($changed, $del);
 
        foreach my $file (@$changed) {
+               print ">>render $file\n";
                scan($file);
        }