[PATCH 16] gitweb: Remove characters entities entirely when shortening string

From: Jakub Narebski <jnareb@gmail.com>
Date: 2006-07-31 06:36:04
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
Yet another error noticed due to strict validation 
of application/xhtml+xml by Mozilla.

 gitweb/gitweb.cgi |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi
index 06a6930..83ea97a 100755
--- a/gitweb/gitweb.cgi
+++ b/gitweb/gitweb.cgi
@@ -776,6 +776,7 @@ sub chop_str {
 	my $tail = $2;
 	if (length($tail) > 4) {
 		$tail = " ...";
+		$body =~ s/&[^;]$//; # remove chopped character entities
 	}
 	return "$body$tail";
 }
-- 
1.4.0

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Mon Jul 31 06:36:47 2006

This archive was generated by hypermail 2.1.8 : 2006-07-31 06:37:15 EST