All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Ralf Thielow" <ralf.thielow@gmail.com>,
	"Jakub Narębski" <jnareb@gmail.com>
Cc: "Raphaël Gertz" <mageia@rapsys.eu>, git@vger.kernel.org
Subject: Re: gitweb html validation
Date: Tue, 15 Nov 2016 16:05:34 -0800	[thread overview]
Message-ID: <xmqqy40ks301.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20161115182632.GA17539@gmail.com> (Ralf Thielow's message of "Tue, 15 Nov 2016 19:26:32 +0100")

Ralf Thielow <ralf.thielow@gmail.com> writes:

> Only block level elements are
> allowed to be inside form tags, according to
> https://www.w3.org/2010/04/xhtml10-strict.html#elem_form
> ...
> I think it's better to just move the <form>-Tag outside of the
> surrounding div?
> Something like this perhaps, I didn't test it myself yet.

That sounds like a sensible update to me (no, I do not run gitweb
myself).  Is this the only <form> we have in the UI, or is it the
only one that is problematic?

> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index 7cf68f07b..33d7c154f 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -5531,8 +5531,8 @@ sub git_project_search_form {
>  		$limit = " in '$project_filter/'";
>  	}
>  
> -	print "<div class=\"projsearch\">\n";
>  	print $cgi->start_form(-method => 'get', -action => $my_uri) .
> +	      "<div class=\"projsearch\">\n" .
>  	      $cgi->hidden(-name => 'a', -value => 'project_list')  . "\n";
>  	print $cgi->hidden(-name => 'pf', -value => $project_filter). "\n"
>  		if (defined $project_filter);
> @@ -5544,11 +5544,11 @@ sub git_project_search_form {
>  	                     -checked => $search_use_regexp) .
>  	      "</span>\n" .
>  	      $cgi->submit(-name => 'btnS', -value => 'Search') .
> -	      $cgi->end_form() . "\n" .
>  	      $cgi->a({-href => href(project => undef, searchtext => undef,
>  	                             project_filter => $project_filter)},
>  	              esc_html("List all projects$limit")) . "<br />\n";
> -	print "</div>\n";
> +	print "</div>\n" .
> +	      $cgi->end_form() . "\n";
>  }
>  
>  # entry for given @keys needs filling if at least one of keys in list
> diff --git a/gitweb/static/gitweb.css b/gitweb/static/gitweb.css
> index 321260103..507740b6a 100644
> --- a/gitweb/static/gitweb.css
> +++ b/gitweb/static/gitweb.css
> @@ -539,7 +539,7 @@ div.projsearch {
>  	margin: 20px 0px;
>  }
>  
> -div.projsearch form {
> +form div.projsearch {
>  	margin-bottom: 2px;
>  }
>  

  reply	other threads:[~2016-11-16  0:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-15 15:13 gitweb html validation Raphaël Gertz
2016-11-15 18:26 ` Ralf Thielow
2016-11-16  0:05   ` Junio C Hamano [this message]
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=xmqqy40ks301.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    --cc=mageia@rapsys.eu \
    --cc=ralf.thielow@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.