From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yasushi SHOJI Subject: [PATCH] gitweb: Escape long title for link tooltips Date: Wed, 27 Sep 2006 11:38:10 +0900 Message-ID: <873baet4ka.wl@mail2.atmark-techno.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-From: git-owner@vger.kernel.org Wed Sep 27 04:41:03 2006 Return-path: Envelope-to: gcvg-git@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GSPLu-0002X1-4r for gcvg-git@gmane.org; Wed, 27 Sep 2006 04:40:51 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932257AbWI0Ckn (ORCPT ); Tue, 26 Sep 2006 22:40:43 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932262AbWI0Ckm (ORCPT ); Tue, 26 Sep 2006 22:40:42 -0400 Received: from shop.atmark-techno.com ([210.191.215.173]:35795 "EHLO mail2.atmark-techno.com") by vger.kernel.org with ESMTP id S932257AbWI0Ckl (ORCPT ); Tue, 26 Sep 2006 22:40:41 -0400 Received: from localhost.atmark-techno.com (dns1.atmark-techno.com [210.191.215.170]) by mail2.atmark-techno.com (Postfix) with ESMTP id 58CF92C371; Wed, 27 Sep 2006 11:40:38 +0900 (JST) To: git@vger.kernel.org User-Agent: Wanderlust/2.14.0 Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: 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 --- 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