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

Re: [PATCH] gitweb: Provide title attributes for abbreviated author names.

From
David Symonds <dsymonds@gmail.com>
Date
Oct 21, 2007, 04:29 UTC
Message-ID
<ee77f5c20710202129t7f60aebbib24d91ba360f64a2@mail.gmail.com>
In-Reply-To
<20071021032533.GA30717@spearce.org>
On 21/10/2007, Shawn O. Pearce <spearce@spearce.org> wrote:
Show 17 quoted lines
> Nice, but...
>
> David Symonds <dsymonds@gmail.com> wrote:
> > +++ b/gitweb/gitweb.perl
> > @@ -3461,9 +3461,15 @@ sub git_shortlog_body {
> >                       print "<tr class=\"light\">\n";
> >               }
> >               $alternate ^= 1;
> > +             my $author = chop_str($co{'author_name'}, 10);
> > +             if ($author ne $co{'author_name'}) {
> > +                     $author = "<span title=\"$co{'author_name'}\">" . esc_html($author) . "</span>";
>
> Doesn't this produce invalid HTML if $co{'author_name'} has a special
> HTML character in it such as & or "?  Note that " is much more likely
> as it is often used for nicknames.  The old code properly escaped
> the author name, and indeed you are doing it for the abbreviated
> version but not the full version.

Sure, I'll fix it up and resend. I might even refactor some code at the same time.

Dave.
Previous: Shawn O. Pearce
Message 3 of 3 in “gitweb: Provide title attributes for abbreviated author names.”
  1. gitweb: Provide title attributes for abbreviated author names.David Symonds, Oct 17, 2007
  2. Shawn O. PearceOct 21, 2007
  3. David SymondsOct 21, 2007

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.