X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fblosxom.git;a=blobdiff_plain;f=blosxom.cgi;h=1233ea4b55ed0a2a8cd56b5914ceff356e288018;hp=9f58a6c1209ea7d218230fb6c73148292f877c03;hb=e1f940ffa67c33220409d768d156f7ed94a56eb6;hpb=3cbfd5e9bf87dbdd2990ce16894c17c316dbda72 diff --git a/blosxom.cgi b/blosxom.cgi index 9f58a6c..1233ea4 100755 --- a/blosxom.cgi +++ b/blosxom.cgi @@ -147,6 +147,7 @@ while () { # Plugins: Start if ( $plugin_dir and opendir PLUGINS, $plugin_dir ) { foreach my $plugin ( grep { /^\w+$/ && -f "$plugin_dir/$_" } sort readdir(PLUGINS) ) { + next if ($plugin =~ /~$/); # Ignore emacs backups my($plugin_name, $off) = $plugin =~ /^\d*(\w+?)(_?)$/; my $on_off = $off eq '_' ? -1 : 1; require "$plugin_dir/$plugin"; @@ -165,7 +166,7 @@ sub load_template { return &$template(@_); } -# Define default find subroutine +# Define default entries subroutine $entries = sub { my(%files, %indexes, %others); @@ -375,7 +376,7 @@ sub generate { # Plugins: Story foreach my $plugin ( @plugins ) { $plugins{$plugin} > 0 and $plugin->can('story') and $entries = $plugin->story($path, $fn, \$story, \$title, \$body) } - if ($content_type =~ m{\bxml\b$}) { + if ($content_type =~ m{\bxml\b}) { # Escape <, >, and &, and to produce valid RSS my %escape = ('<'=>'<', '>'=>'>', '&'=>'&', '"'=>'"'); my $escape_re = join '|' => keys %escape;