* Fix absolute url munging in rss generation to support https, ftp, etc urls
[ikiwiki.git] / IkiWiki / Plugin / inline.pm
index 8b67bfa61c341e0f3ee4fbb5c409c4a7cc226e5b..9a86aad0bfa4ad7bb8588abf984fc24032f4c349 100644 (file)
@@ -62,7 +62,7 @@ sub preprocess_inline (@) { #{{{
                $template->param(pagelink => htmllink($params{page}, $params{page}, $page));
                $template->param(content => get_inline_content($params{page}, $page))
                        if $params{archive} eq "no";
-               $template->param(ctime => scalar(gmtime($pagectime{$page})));
+               $template->param(ctime => displaytime($pagectime{$page}));
                $ret.=$template->output;
        }
        
@@ -100,7 +100,7 @@ sub get_inline_content ($$) { #{{{
        my $file=$pagesources{$page};
        my $type=pagetype($file);
        if ($type ne 'unknown') {
-               return htmlize($type, linkify($page, $parentpage, readfile(srcfile($file))));
+               return htmlize($type, preprocess($page, linkify($page, $parentpage, readfile(srcfile($file))), 1));
        }
        else {
                return "";
@@ -121,8 +121,8 @@ sub absolute_urls ($$) { #{{{
 
        $url=~s/[^\/]+$//;
        
-       $content=~s/<a\s+href="(?!http:\/\/)([^"]+)"/<a href="$url$1"/ig;
-       $content=~s/<img\s+src="(?!http:\/\/)([^"]+)"/<img src="$url$1"/ig;
+       $content=~s/<a\s+href="(?![^:]+:\/\/)([^"]+)"/<a href="$url$1"/ig;
+       $content=~s/<img\s+src="(?![^:]+:\/\/)([^"]+)"/<img src="$url$1"/ig;
        return $content;
 } #}}}