From: Jakub Narebski Date: Mon, 05 Mar 2012 08:59:47 GMT Subject: Re: [PATCH (for maint)] gitweb: Fix fixed string (non-regexp) project search Message-ID: <201203050959.47966.jnareb@gmail.com> In-Reply-To: <7vfwdn631i.fsf@alter.siamese.dyndns.org> Junio C Hamano wrote: > Jakub Narebski writes: > > > And here is the patch for maint > > -->8-- -------------------------------------------------------- -->8-- > > Subject: gitweb: Fix fixed string (non-regexp) project search > > > > Use $search_regexp, where regex metacharacters are quoted, for > > searching projects list, rather than $searchtext, which contains > > original search term. > > > > Reported-by: Ramsay Jones > > Signed-off-by: Jakub Narebski > > --- > > gitweb/gitweb.perl | 20 +++++++++++--------- > > 1 files changed, 11 insertions(+), 9 deletions(-) > > > > diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl > > index d5dbd64..e248792 100755 > > --- a/gitweb/gitweb.perl > > +++ b/gitweb/gitweb.perl > > @@ -5290,9 +5290,11 @@ sub git_project_list_body { > > @projects = fill_project_list_info(\@projects); > > # searching projects require filling to be run before it > > @projects = search_projects_list(\@projects, > > - 'searchtext' => $searchtext, > > - 'tagfilter' => $tagfilter) > > - if ($tagfilter || $searchtext); > > + 'search_regexp' => $search_regexp, > > + 'tagfilter' => $tagfilter) > > + if ($tagfilter || $search_regexp); > > + # fill the rest > > + @projects = fill_project_list_info(\@projects); > > Hmph, didn't you already call fill_project_list_info(\@projects) before > search_projects_list() already? True. Sorry about that. Can you fix that, or should I resend? -- Jakub Narebski Poland