[PATCH] gitweb: Escape long title for link tooltips

From: Yasushi SHOJI <yashi@atmark-techno.com>
Date: 2006-09-27 12:38:10
This is a simple one liner to fix the bug not escaping title string
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..67f49df 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 => esc_html($long)},
 		       esc_html($short) . $extra);
 	} else {
 		return $cgi->a({-href => $href, -class => "list subject"},
-- 
1.4.2.1.g83915

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Sep 27 12:40:59 2006

This archive was generated by hypermail 2.1.8 : 2006-09-27 12:44:40 EST