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>
Junio C Hamano committed
Nov 9, 2006 at 00:57 UTC
225932ed4daa84f862a739ba4ea01a0bba2dfe45
1 file changed
+2
-3
gitweb/gitweb.perl
+2
-3
@@ -814,12 +814,11 @@ sub file_type_long {
814
## functions returning short HTML fragments, or transforming HTML fragments
815
## which don't beling to other sections
816
817
-# format line of commit message or tag comment
817
+# format line of commit message.
818
sub format_log_line_html {
819
my $line = shift;
820
821
- $line = esc_html($line);
822
- $line =~ s/ / /g;
821
+ $line = esc_html($line, -nbsp=>1);
822
if ($line =~ m/([0-9a-fA-F]{40})/) {
823
my $hash_text = $1;
824
if (git_get_type($hash_text) eq "commit") {