Skip to content

Commit 4a0641b

Browse files
yashiJunio C Hamano
authored andcommitted
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 <yashi@atmark-techno.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 191414c commit 4a0641b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gitweb/gitweb.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ sub format_subject_html {
617617

618618
if (length($short) < length($long)) {
619619
return $cgi->a({-href => $href, -class => "list subject",
620-
-title => $long},
620+
-title => decode("utf8", $long, Encode::FB_DEFAULT)},
621621
esc_html($short) . $extra);
622622
} else {
623623
return $cgi->a({-href => $href, -class => "list subject"},

0 commit comments

Comments
 (0)