]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: Replace form-feed character by ^L
authorJakub Narebski <redacted>
Sun, 30 Jul 2006 13:02:27 +0000 (15:02 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:04:56 +0000 (00:04 -0400)
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.cgi

index 90bfe72f129e1c5bb3c9931d27851689325c288384c43e257906289f2bf6792c..899242e1298234146eee75c0903ada41c52e8c9ec05488daf0448467ae070ec8 100755 (executable)
@@ -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;
 }
 
This page took 0.226153 seconds and 4 git commands to generate.