[PATCH 4/5] ui: Fix bad value for attribute action on form elements
John Keeping
john at keeping.me.uk
Wed May 11 20:50:02 CEST 2016
On Wed, May 11, 2016 at 06:04:17PM +0000, Juuso Lapinlampi wrote:
> The action attribute must "a valid non-empty URL potentially surrounded
> by spaces."
>
> See: https://html.spec.whatwg.org/#the-form-element
Makes sense (although missing sign-off again):
Reviewed-by: John Keeping <john at keeping.me.uk>
> ---
> ui-shared.c | 2 +-
> ui-stats.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/ui-shared.c b/ui-shared.c
> index 9a38aa9..0b7fdec 100644
> --- a/ui-shared.c
> +++ b/ui-shared.c
> @@ -940,7 +940,7 @@ static void print_header(void)
> cgit_summary_link(ctx.repo->name, ctx.repo->name, NULL, NULL);
> if (ctx.env.authenticated) {
> html("</td><td class='form'>");
> - html("<form method='get' action=''>\n");
> + html("<form method='get' action='.'>\n");
> cgit_add_hidden_formfields(0, 1, ctx.qry.page);
> html("<select name='h' onchange='this.form.submit();'>\n");
> for_each_branch_ref(print_branch_option, ctx.qry.head);
> diff --git a/ui-stats.c b/ui-stats.c
> index 8cd9178..1fa634f 100644
> --- a/ui-stats.c
> +++ b/ui-stats.c
> @@ -389,7 +389,7 @@ void cgit_show_stats(void)
> cgit_print_layout_start();
> html("<div class='cgit-panel'>");
> html("<b>stat options</b>");
> - html("<form method='get' action=''>");
> + html("<form method='get' action='.'>");
> cgit_add_hidden_formfields(1, 0, "stats");
> html("<table><tr><td colspan='2'/></tr>");
> if (ctx.repo->max_stats > 1) {
> --
> 2.8.1
>
> _______________________________________________
> CGit mailing list
> CGit at lists.zx2c4.com
> http://lists.zx2c4.com/mailman/listinfo/cgit
More information about the CGit
mailing list