From: Yasushi SHOJI Date: Wed, 27 Sep 2006 03:04:10 +0000 (+0900) Subject: gitweb: Decode long title for link tooltips X-Git-Tag: v1.4.3-rc1~30 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4a0641b7cf833644b286b56bb57d66b5538e4418;p=git.git gitweb: Decode long title for link tooltips This is a simple one liner to decode long title string in perl's internal form to utf-8 for link tooltips. This is not crucial if the commit message is all in ASCII, however, if you decide to use other encoding, such as UTF-8, tooltips ain't readable any more. Signed-off-by: Yasushi SHOJI Signed-off-by: Junio C Hamano --- diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 66be61933..597d29f22 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -617,7 +617,7 @@ sub format_subject_html { if (length($short) < length($long)) { return $cgi->a({-href => $href, -class => "list subject", - -title => $long}, + -title => decode("utf8", $long, Encode::FB_DEFAULT)}, esc_html($short) . $extra); } else { return $cgi->a({-href => $href, -class => "list subject"},