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

Re: [PATCH] gitweb: fix esc_param

From
Stephen Boyd <bebarino@gmail.com>
Date
Oct 14, 2009, 06:29 UTC
Message-ID
<4AD56FD9.70602@gmail.com>
In-Reply-To
<cb7bb73a0910132319p27b4f362sf5bffa2afe6e5849@mail.gmail.com>
Giuseppe Bilotta wrote:
Show 6 quoted lines
> On Wed, Oct 14, 2009 at 3:13 AM, Stephen Boyd <bebarino@gmail.com> wrote:
>> This works great for my purposes. Thanks.
>
> Can you also check if this fixes the branch name issue you mentioned
> in the other branch? (And/or do you have a repository exposing the
> problem if not?)
(We're jumping back and forth between threads haha)

Sorry, it doesn't. But this diff fixes the first part of the problem. There are still problems with the RSS/Atom feed names being mangled. The branch name I'm using is gitwéb, but I imagine any utf8 character will fail.

I see the title and the actual text being mangled without this patch.
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 4b21ad2..910c370 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1500,9 +1500,10 @@ sub format_ref_marker {
                                -href => href(
                                        action=>$dest_action,
                                        hash=>$dest
-                               )}, $name);
+                               )}, esc_html($name));
 
-                       $markers .= " <span class=\"$class\" title=\"$ref\">" .
+                       my $title_ref = esc_html($ref);
+                       $markers .= " <span class=\"$class\" title=\"$title_ref\">" .
                                $link . "</span>";
                }
        }
Previous: Giuseppe BilottaNext: Jakub Narebski
Message 4 of 7 in “gitweb: fix esc_param”
  1. gitweb: fix esc_paramGiuseppe Bilotta, Oct 13, 2009
  2. Stephen BoydOct 14, 2009
  3. Giuseppe BilottaOct 14, 2009
  4. Stephen BoydOct 14, 2009
  5. Jakub NarebskiOct 14, 2009
  6. Jakub NarebskiOct 14, 2009
  7. Junio C HamanoOct 14, 2009

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.