]> asedeno.scripts.mit.edu Git - git.git/blobdiff - gitweb/gitweb.perl
gitweb: Quote non-displayable characters in hex, not octal
[git.git] / gitweb / gitweb.perl
index 18e70a366333fffbadd37a7fbe509b4c33f9421f..eb2943a530189325407d83d12f22ca3494524866 100755 (executable)
@@ -775,7 +775,7 @@ sub quot_cec {
        );
        my $chr = ( (exists $es{$cntrl})
                    ? $es{$cntrl}
-                   : sprintf('\%03o', ord($cntrl)) );
+                   : sprintf('\%2x', ord($cntrl)) );
        if ($opts{-nohtml}) {
                return $chr;
        } else {