1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-23 12:36:09 +02:00

gitweb: protect commit messages from controls.

The same change as the previous.  It is rather sad that commit log
message parser gives list of chomped lines while tag message parser
gives unchomped ones.

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Junio C Hamano 2006-11-09 00:57:13 -08:00
parent 25ffbb27a2
commit 225932ed4d

View File

@ -814,12 +814,11 @@ sub file_type_long {
## functions returning short HTML fragments, or transforming HTML fragments
## which don't beling to other sections
# format line of commit message or tag comment
# format line of commit message.
sub format_log_line_html {
my $line = shift;
$line = esc_html($line);
$line =~ s/ /&nbsp;/g;
$line = esc_html($line, -nbsp=>1);
if ($line =~ m/([0-9a-fA-F]{40})/) {
my $hash_text = $1;
if (git_get_type($hash_text) eq "commit") {