git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gitweb: Change to use explicitly function call cgi->escapHTML()
@ 2007-03-06  3:58 Li Yang
  2007-03-06  6:55 ` Junio C Hamano
  0 siblings, 1 reply; 21+ messages in thread
From: Li Yang @ 2007-03-06  3:58 UTC (permalink / raw)
  To: junkio; +Cc: git, jnareb

Change to use explicitly function call cgi->escapHTML().
This fix the problem on some systems that escapeHTML() is not
functioning, as default CGI is not setting 'escape' parameter.

Signed-off-by: Li Yang <leoli@freescale.com>

---
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 653ca3c..3a564d1 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -591,7 +591,7 @@ sub esc_html ($;%) {
 	my %opts = @_;
 
 	$str = to_utf8($str);
-	$str = escapeHTML($str);
+	$str = $cgi->escapeHTML($str);
 	if ($opts{'-nbsp'}) {
 		$str =~ s/ /&nbsp;/g;
 	}
@@ -605,7 +605,7 @@ sub esc_path {
 	my %opts = @_;
 
 	$str = to_utf8($str);
-	$str = escapeHTML($str);
+	$str = $cgi->escapeHTML($str);
 	if ($opts{'-nbsp'}) {
 		$str =~ s/ /&nbsp;/g;
 	}

^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2007-03-07  1:40 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-06  3:58 [PATCH] gitweb: Change to use explicitly function call cgi->escapHTML() Li Yang
2007-03-06  6:55 ` Junio C Hamano
2007-03-06  9:34   ` Jakub Narebski
2007-03-06  9:39     ` Jeff King
2007-03-06  9:46       ` Junio C Hamano
2007-03-06 10:31       ` Li Yang-r58472
2007-03-06 10:41         ` Jeff King
2007-03-06 10:53           ` Junio C Hamano
2007-03-06 10:56             ` Jeff King
2007-03-06 10:58               ` Junio C Hamano
2007-03-06 11:01                 ` Jeff King
2007-03-06 11:05                   ` Junio C Hamano
2007-03-06 11:07                     ` Jeff King
2007-03-06 11:07                   ` Li Yang-r58472
2007-03-06 10:45         ` Junio C Hamano
2007-03-06 13:23           ` Jakub Narebski
2007-03-06 23:17             ` Junio C Hamano
2007-03-07  0:37               ` Jakub Narebski
2007-03-07  0:49                 ` Junio C Hamano
2007-03-07  1:21                   ` [PATCH] gitweb: Don't escape attributes in CGI.pm HTML methods Jakub Narebski
2007-03-07  1:40                     ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).