]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: Decode long title for link tooltips
authorYasushi SHOJI <redacted>
Wed, 27 Sep 2006 03:04:10 +0000 (12:04 +0900)
committerLady <redacted>
Mon, 6 Apr 2026 04:07:10 +0000 (00:07 -0400)
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index 54ec440fb7f94ea32212c4c3bf3c9923c3415153b78451315fa3747d4af74d17..a4f13bbfd52a3440b125758b3c32040c117d5fdb3650ca4bb659da07d799a370 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"},
This page took 0.231579 seconds and 4 git commands to generate.