From: Darold Gilles Date: Tue, 23 Sep 2014 16:07:57 +0000 (+0200) Subject: Fix incomplete last commit and add escaping of html. Thanks to Julien Rouhauld for... X-Git-Tag: v6.1~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4aa60af31abf72683d5cecb30fdb12d45c07a492;p=pgbadger Fix incomplete last commit and add escaping of html. Thanks to Julien Rouhauld for the patch. --- diff --git a/pgbadger b/pgbadger index 4a1e4ca..d4dde05 100755 --- a/pgbadger +++ b/pgbadger @@ -369,6 +369,8 @@ my $result = GetOptions( ); die "FATAL: use pgbadger --help\n" if (not $result); +$report_title = &escape_html($report_title) if $report_title; + if ($ver) { print "pgBadger version $VERSION\n"; exit 0; @@ -3432,6 +3434,8 @@ sub dump_error_as_text if ($#log_files > 0) { $logfile_str .= ', ..., ' . $log_files[-1]; } + $report_title ||= 'PostgreSQL Log Analyzer'; + print $fh qq{ pgBadger :: $report_title @@ -3530,10 +3534,16 @@ sub html_header my @tmpjscode = @jscode; map { s/EDIT_URI/$uri/; } @tmpjscode; + my $local_title = 'PostgreSQL Log Analyzer'; + if ($report_title) { + $local_title = $report_title; + } + $report_title ||= 'pgBadger'; + print $fh qq{ -pgBadger :: $report_title +pgBadger :: $local_title