diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-01-09 08:26:08 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-01-09 08:26:09 -0800 |
commit | fd6db678a1c6455eccd0b98a12f9907932e328e9 (patch) | |
tree | 3c358e97df0d336f9ce5b37691b9885b8a67899a /gitweb | |
parent | 85f269704890e71933ea90cd8e6b4ef23f51d620 (diff) | |
parent | 0e901d24fd70630ffed5411e6217c2dfce9c8da6 (diff) | |
download | git-fd6db678a1c6455eccd0b98a12f9907932e328e9.tar.gz |
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
Diffstat (limited to 'gitweb')
-rwxr-xr-x | gitweb/gitweb.perl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 656b324fb7..c6bafe6ead 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; } |