From: Florian La Roche <laroche@redhat.com>
To: git@vger.kernel.org
Subject: [laroche@redhat.com: gitweb.cgi]
Date: Mon, 25 Sep 2006 18:19:34 +0200 [thread overview]
Message-ID: <20060925161934.GA18951@dudweiler.stuttgart.redhat.com> (raw)
Hello git crew,
I'm not a big perl prorammer, but the following removes perl
warnings about accessing undefined vars.
regards,
Florian La Roche
--- gitweb/gitweb.perl
+++ gitweb/gitweb.perl
@@ -427,7 +427,9 @@ sub esc_html {
my $str = shift;
$str = decode("utf8", $str, Encode::FB_DEFAULT);
$str = escapeHTML($str);
- $str =~ s/\014/^L/g; # escape FORM FEED (FF) character (e.g. in COPYING file)
+ if (defined $str) {
+ $str =~ s/\014/^L/g; # escape FORM FEED (FF) character (e.g. in COPYING file)
+ }
return $str;
}
@@ -2860,10 +2819,14 @@ sub git_log {
my $ref = format_ref_marker($refs, $commit);
my %co = parse_commit($commit);
next if !%co;
+ my $esc_title = $co{'title'};
+ if (defined $esc_title) {
+ $esc_title = esc_html($esc_title);
+ }
my %ad = parse_date($co{'author_epoch'});
git_print_header_div('commit',
"<span class=\"age\">$co{'age_string'}</span>" .
- esc_html($co{'title'}) . $ref,
+ $esc_title . $ref,
$commit);
print "<div class=\"title_text\">\n" .
"<div class=\"log_link\">\n" .
next reply other threads:[~2006-09-25 16:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-25 16:19 Florian La Roche [this message]
2006-09-25 16:32 ` [laroche@redhat.com: gitweb.cgi] Jakub Narebski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060925161934.GA18951@dudweiler.stuttgart.redhat.com \
--to=laroche@redhat.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).