git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] gitweb: Escape long title for link tooltips

From
Yasushi SHOJI <yashi@atmark-techno.com>
Date
Sep 27, 2006, 02:38 UTC
Message-ID
<873baet4ka.wl@mail2.atmark-techno.com>

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
Next: Yasushi SHOJI
Message 1 of 7 in “gitweb: Escape long title for link tooltips”
  1. gitweb: Escape long title for link tooltipsYasushi SHOJI, Sep 27, 2006
  2. Yasushi SHOJISep 27, 2006
  3. gitweb: Decode long title for link tooltipsYasushi SHOJI, Sep 27, 2006
  4. Jakub NarebskiOct 1, 2006
  5. Yasushi SHOJIOct 1, 2006
  6. Jakub NarebskiOct 1, 2006
  7. Jakub NarebskiOct 6, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.