]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki.pm
Update my (spalax) information
[git.ikiwiki.info.git] / IkiWiki.pm
index 97fe6b8ffa035032812a8340e7b1953e06277282..6aa49229ace4ba23c68267ca942786da445526ac 100644 (file)
@@ -843,12 +843,9 @@ sub log_message ($$) {
                        $log_open=1;
                }
                eval {
-                       # keep a copy to avoid editing the original config repeatedly
-                       my $wikiname = $config{wikiname};
-                       utf8::encode($wikiname);
-                       my $message = join(" ", @_);
+                       my $message = "[$config{wikiname}] ".join(" ", @_);
                        utf8::encode($message);
-                       Sys::Syslog::syslog($type, "[$wikiname] %s", $message);
+                       Sys::Syslog::syslog($type, "%s", $message);
                };
                 if ($@) {
                     print STDERR "failed to syslog: $@" unless $log_failed;
@@ -1650,6 +1647,8 @@ sub preprocess ($$$;$$) {
                                if ($@) {
                                        my $error=$@;
                                        chomp $error;
+                                       eval q{use HTML::Entities};
+                                       $error = encode_entities($error);
                                        $ret="[[!$command <span class=\"error\">".
                                                gettext("Error").": $error"."</span>]]";
                                }
@@ -1827,7 +1826,7 @@ sub check_canchange (@) {
                $file=possibly_foolish_untaint($file);
                if (! defined $file || ! length $file ||
                    file_pruned($file)) {
-                       error(gettext("bad file name %s"), $file);
+                       error(sprintf(gettext("bad file name %s"), $file));
                }
 
                my $type=pagetype($file);