From: Yasushi SHOJI <yashi@atmark-techno.com>
To: git@vger.kernel.org
Subject: [PATCH] gitweb: Decode long title for link tooltips
Date: Wed, 27 Sep 2006 12:04:10 +0900 [thread overview]
Message-ID: <87zmcmroqf.wl@mail2.atmark-techno.com> (raw)
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
next prev parent reply other threads:[~2006-09-27 3:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-27 2:38 [PATCH] gitweb: Escape long title for link tooltips Yasushi SHOJI
2006-09-27 3:06 ` Yasushi SHOJI
2006-09-27 3:04 ` Yasushi SHOJI [this message]
2006-10-01 16:45 ` [PATCH] gitweb: Decode " Jakub Narebski
2006-10-01 21:33 ` Yasushi SHOJI
2006-10-01 21:49 ` Jakub Narebski
2006-10-06 8:54 ` Jakub Narebski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zmcmroqf.wl@mail2.atmark-techno.com \
--to=yashi@atmark-techno.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.