]> Lady’s Gitweb - Gitweb/blobdiff - gitweb.perl
gitweb: fix error in sanitize when highlight is enabled
[Gitweb] / gitweb.perl
index 75430594451adb1cbf3135893bfe6012708a37e0b68d03c545b1f4ae768591b1..a42c31175f36a6fa9496bde057dcdeb1dd342960a6d2792b64d960016465936b 100755 (executable)
@@ -1557,7 +1557,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;
 }
 
This page took 0.208895 seconds and 4 git commands to generate.