[PATCH] gitweb: Decode long title for link tooltips
- From
Yasushi SHOJI <yashi@atmark-techno.com>
- Date
- Sep 27, 2006, 03:04 UTC
- Message-ID
- <87zmcmroqf.wl@mail2.atmark-techno.com>
- In-Reply-To
- <871wpyt3ch.wl@mail2.atmark-techno.com>
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> --- gitweb/gitweb.perl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 66be619..597d29f 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/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"},
-- 1.4.2.1.g83915