]> git.ipfire.org Git - thirdparty/git.git/commitdiff
gitweb: Decode long title for link tooltips
authorYasushi SHOJI <yashi@atmark-techno.com>
Wed, 27 Sep 2006 03:04:10 +0000 (12:04 +0900)
committerJunio C Hamano <junkio@cox.net>
Wed, 27 Sep 2006 07:08:51 +0000 (00:08 -0700)
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 <yashi@atmark-techno.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
gitweb/gitweb.perl

index 66be61933257bf1191d35a8d568df614cc2ac150..597d29f22fc931cf13574a8d2b0fde9f6b2f9908 100755 (executable)
@@ -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"},