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

From: Jakub Narebski <[email-masked]>
Date: Sun, 30 Jul 2006 22:36:04 +0200

Signed-off-by: Jakub Narebski <[email-masked]>
---
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