summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-01-12 00:48:30 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-01-12 00:48:30 (GMT)
commit23ad617702e33a8e3c60511f07fe0d152856a39e (patch)
tree8fcc5fcd34d729ed385273d2f28bbb9a81f7d3be
parent378e5e4d9fe3bd339f47a6894ad9a33e7cc3879a (diff)
parent0e901d24fd70630ffed5411e6217c2dfce9c8da6 (diff)
downloadgit-23ad617702e33a8e3c60511f07fe0d152856a39e.zip
git-23ad617702e33a8e3c60511f07fe0d152856a39e.tar.gz
git-23ad617702e33a8e3c60511f07fe0d152856a39e.tar.bz2
Merge branch 'os/gitweb-highlight-uncaptured' into maint
"gitweb", when sorting by age to show repositories with new activities first, used to sort repositories with absolutely nothing in it early, which was not very useful. * os/gitweb-highlight-uncaptured: gitweb: fix error in sanitize when highlight is enabled
-rwxr-xr-xgitweb/gitweb.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 656b324..c6bafe6 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -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;
}