Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorPetr Baudis <pasky@suse.cz>2008-10-02 00:11:54 +0400
committerShawn O. Pearce <spearce@spearce.org>2008-10-03 04:16:50 +0400
commit25dfd171d646c38f9344d8e3d8ae0fdf179dd281 (patch)
tree44c87e36b3f3fe7e627330c887e5de5c287b9d74 /gitweb
parent5e22e21769454857e00bc55be1f2eef8d873ba72 (diff)
gitweb: Quote non-displayable characters in hex, not octal
For the last 30 years, the mankind uses the octal representation of characters only in rare cases and most character codes are hardly recognizable in octal. In contrast, many programmers still know hexadecimal well and that is also the representation of choice e.g. for Unicode codepoints. Signed-off-by: Petr Baudis <petr.baudis@novartis.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 18e70a3663..eb2943a530 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -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 {