[PATCH] gitweb: Change to use explicitly function call cgi->escapHTML()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>

---
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;
	}

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]