git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Raphaël Gertz" <mageia@rapsys.eu>
To: git@vger.kernel.org
Subject: gitweb html validation
Date: Tue, 15 Nov 2016 16:13:23 +0100	[thread overview]
Message-ID: <13c9b4a74d82a1f0ed3f626406a43e92@rapsys.eu> (raw)

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)},

             reply	other threads:[~2016-11-15 15:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-15 15:13 Raphaël Gertz [this message]
2016-11-15 18:26 ` gitweb html validation Ralf Thielow
2016-11-16  0:05   ` Junio C Hamano
2016-11-16  9:25     ` Raphaël Gertz
2016-11-18 20:06   ` Ralf Thielow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=13c9b4a74d82a1f0ed3f626406a43e92@rapsys.eu \
    --to=mageia@rapsys.eu \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).