From: Yasushi SHOJI Date: Wed, 27 Sep 2006 03:04:10 +0000 (+0900) Subject: gitweb: Decode long title for link tooltips X-Git-Url: https://git.ladys.computer/Gitweb/commitdiff_plain/ba0da63ca128eb53c7c9f1265177c56eb23db890becadc99180263ce56d95a0b 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.perl b/gitweb.perl index 54ec440..a4f13bb 100755 --- a/gitweb.perl +++ b/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"},