Skip to content

Commit

Permalink
gitweb: Decode long title for link tooltips
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
yashi authored and Junio C Hamano committed Sep 27, 2006
1 parent 191414c commit 4a0641b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down

0 comments on commit 4a0641b

Please sign in to comment.