Browse Source

Merge branch 'os/gitweb-highlight-uncaptured'

The code to sanitize control characters before passing it to
"highlight" filter lost known-to-be-safe control characters by
mistake.

* os/gitweb-highlight-uncaptured:
  gitweb: fix error in sanitize when highlight is enabled
maint
Junio C Hamano 12 years ago
parent
commit
fd6db678a1
  1. 2
      gitweb/gitweb.perl

2
gitweb/gitweb.perl

@ -1556,7 +1556,7 @@ sub sanitize { @@ -1556,7 +1556,7 @@ sub sanitize {
return undef unless defined $str;

$str = to_utf8($str);
$str =~ s|([[:cntrl:]])|($1 =~ /[\t\n\r]/ ? $1 : quot_cec($1))|eg;
$str =~ s|([[:cntrl:]])|(index("\t\n\r", $1) != -1 ? $1 : quot_cec($1))|eg;
return $str;
}


Loading…
Cancel
Save