Merge branch 'mh/ceiling' into maint
[git.git] / gitweb / gitweb.perl
index 656b324fb7f82c7f65c71075f57e909843c50cce..c6bafe6ead815ece2e820d303e442270749c5c4b 100755 (executable)
@@ -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;
 }