@matheusbsbs / matheus-bagliano / commits / 3dc1383290
Fork 0

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>

Jakub Narebski committed Jul 30, 2006 at 15:02 UTC 3dc1383290f9db3371a13ae8009ce4fcd5ffc93a
1 file changed +1
gitweb/gitweb.cgi
+1
@@ -250,6 +250,7 @@ sub esc_html {
250 my $str = shift;
251 $str = decode("utf8", $str, Encode::FB_DEFAULT);
252 $str = escapeHTML($str);
253 + $str =~ s/\014/^L/g; # escape FORM FEED (FF) character (e.g. in COPYING file)
254 return $str;
255 }
256