gitweb: Remove characters entities entirely when shortening string
[gitweb.git] / gitweb / gitweb.cgi
index 10128690484e060113088297ea85059b8ec48bb2..1ff29bc2918d203715709930a34fe082d60e579a 100755 (executable)
@@ -776,6 +776,7 @@ sub chop_str {
        my $tail = $2;
        if (length($tail) > 4) {
                $tail = " ...";
+               $body =~ s/&[^;]$//; # remove chopped character entities
        }
        return "$body$tail";
 }