Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'os/gitweb-highlight-uncaptured'
author
Junio C Hamano
<gitster@pobox.com>
Wed, 9 Jan 2013 16:26:08 +0000
(08:26 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 9 Jan 2013 16:26:09 +0000
(08:26 -0800)
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
gitweb/gitweb.perl
patch
|
blob
|
history
raw
(from parent 1:
85f2697
)
diff --git
a/gitweb/gitweb.perl
b/gitweb/gitweb.perl
index 656b324fb7f82c7f65c71075f57e909843c50cce..c6bafe6ead815ece2e820d303e442270749c5c4b 100755
(executable)
--- 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;
}