]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: Escape ESCAPE (\e) character
authorLuben Tuikov <redacted>
Mon, 2 Oct 2006 21:54:53 +0000 (14:54 -0700)
committerLady <redacted>
Mon, 6 Apr 2026 04:07:10 +0000 (00:07 -0400)
Take a look at commit 20a3847d8a5032ce41f90dcc68abfb36e6fee9b1
using gitweb before this patch.  This patch fixes this.

Signed-off-by: Luben Tuikov <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index 01e98defd04bcc5a5d09a7c5072084eeb730176519d7f3fd6ce65c64a4d0857f..1bcad9cf8ada8160af0e27a138d90b23d37e5e1ab471c2dcd44ffb9692dadf60 100755 (executable)
@@ -485,6 +485,7 @@ sub esc_html {
        $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)
+       $str =~ s/\033/^[/g; # "escape" ESCAPE (\e) character (e.g. commit 20a3847d8a5032ce41f90dcc68abfb36e6fee9b1)
        return $str;
 }
 
This page took 0.294885 seconds and 4 git commands to generate.