From: Luben Tuikov Date: Mon, 2 Oct 2006 21:54:53 +0000 (-0700) Subject: gitweb: Escape ESCAPE (\e) character X-Git-Url: https://git.ladys.computer/Gitweb/commitdiff_plain/6443eda5724c0012d0b79f5e48d88790a64c010b81072480dda1872993c6dc33 gitweb: Escape ESCAPE (\e) character Take a look at commit 20a3847d8a5032ce41f90dcc68abfb36e6fee9b1 using gitweb before this patch. This patch fixes this. Signed-off-by: Luben Tuikov Signed-off-by: Junio C Hamano --- diff --git a/gitweb.perl b/gitweb.perl index 01e98de..1bcad9c 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -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; }