aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-11-09 00:57:13 -0800
committerJunio C Hamano <junkio@cox.net>2006-11-09 00:57:13 -0800
commit225932ed4daa84f862a739ba4ea01a0bba2dfe45 (patch)
treec276510fcdc4ed2e61d59173b50a1ac2a76d63d9
parent25ffbb27a20278e9884e8f036b39806bb11ec1a8 (diff)
downloadgit-225932ed4daa84f862a739ba4ea01a0bba2dfe45.tar.gz
git-225932ed4daa84f862a739ba4ea01a0bba2dfe45.tar.xz
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>
-rwxr-xr-xgitweb/gitweb.perl5
1 files changed, 2 insertions, 3 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index f4d1ef007..1a757cce3 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -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") {