aboutsummaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorJakub Narebski <jnareb@gmail.com>2006-07-30 15:02:27 +0200
committerJunio C Hamano <junkio@cox.net>2006-07-30 18:40:15 -0700
commit3dc1383290f9db3371a13ae8009ce4fcd5ffc93a (patch)
treea30bcadd25d360713d8e74ae19e0c2554624bce4 /gitweb
parent0d83ddc40f356aa0b5618a6571f5146818ec2b41 (diff)
downloadgit-3dc1383290f9db3371a13ae8009ce4fcd5ffc93a.tar.gz
git-3dc1383290f9db3371a13ae8009ce4fcd5ffc93a.tar.xz
gitweb: Replace form-feed character by ^L
From 2be5cab10486cba804ccae063e93b146288054fe Mon Sep 17 00:00:00 2001 From: Jakub Narebski <jnareb@gmail.com> Date: Sun, 30 Jul 2006 13:11:56 +0200 Subject: [PATCH] Replace FORM FEED (FF) character (014, 12, 0xc) by it's textual representation '^L'. This character is used for example in GNU GPL 'COPYING' file. With this patch "blob" output for COPYING passes XHTML validation. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.cgi1
1 files changed, 1 insertions, 0 deletions
diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi
index 2b35763ee..79275f38d 100755
--- a/gitweb/gitweb.cgi
+++ b/gitweb/gitweb.cgi
@@ -250,6 +250,7 @@ sub esc_html {
my $str = shift;
$str = decode("utf8", $str, Encode::FB_DEFAULT);
$str = escapeHTML($str);
+ $str =~ s/\014/^L/g; # escape FORM FEED (FF) character (e.g. in COPYING file)
return $str;
}