]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: protect commit messages from controls.
authorJunio C Hamano <redacted>
Thu, 9 Nov 2006 08:57:13 +0000 (00:57 -0800)
committerLady <redacted>
Mon, 6 Apr 2026 04:07:11 +0000 (00:07 -0400)
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 <redacted>
gitweb.perl

index ab5fefa2008ba407f729e08b9bfde1da38d8c37bfb8a47b7e18cab21d538ef52..37f13f19afcddf8c3957f2218e957e04fd3fe1bb230c9c33c34cd0bb9adde28d 100755 (executable)
@@ -815,12 +815,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") {
This page took 0.242756 seconds and 4 git commands to generate.