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

gitweb html validation

From
RGRaphaël Gertz <mageia@rapsys.eu>
Date
Nov 15, 2016, 15:13 UTC
Message-ID
<13c9b4a74d82a1f0ed3f626406a43e92@rapsys.eu>
Hi,

There a small bug in gitweb html validation, you need the following patch to pass w3c check with searchbox enabled.

The problem lies in the input directly embed inside a form without a wrapper which is not valid.

Best regards

The following patch fix the issue for git-2.10.2 : --- /usr/share/gitweb/gitweb.cgi.orig 2016-11-15 15:37:21.149805026 +0100 +++ /usr/share/gitweb/gitweb.cgi 2016-11-15 15:37:48.579240429 +0100

@@ -5518,6 +5518,7 @@ sub git_project_search_form {

         print "<div class=\"projsearch\">\n";
         print $cgi->start_form(-method => 'get', -action => $my_uri) .
+             '<div>'.
               $cgi->hidden(-name => 'a', -value => 'project_list')  . 
"\n";
         print $cgi->hidden(-name => 'pf', -value => $project_filter). 
"\n"
                 if (defined $project_filter);
@@ -5529,6 +5530,7 @@ sub git_project_search_form {
                              -checked => $search_use_regexp) .
               "</span>\n" .
               $cgi->submit(-name => 'btnS', -value => 'Search') .
+             '</div>'.
               $cgi->end_form() . "\n" .
               $cgi->a({-href => href(project => undef, searchtext => 
undef,
                                      project_filter => 
$project_filter)},
Next: Ralf Thielow
Message 1 of 5 in “gitweb html validation”
  1. Raphaël GertzNov 15, 2016
  2. Ralf ThielowNov 15, 2016
  3. Junio C HamanoNov 16, 2016
  4. Raphaël GertzNov 16, 2016
  5. Ralf ThielowNov 18, 2016

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.