Skip to content

Input elements "name" attribute should allow arbitrary strings instead of only ID #40

Description

@jhorstmann

It's been a long time since I did any html, but I remember being able to use names such as foo[0].bar or foo[] as input field names, so that a web framework could reconstruct a nested structure from query/form parameters. It seems this is not currently supported, and the attribute is defined as being of type ID.

Using such a name leads to a runtime panic such as

ERROR: <input name="foobar[]"> failed to parse attribute value: ID can only contain alphanumerics, dash, dot and underscore

The whatwg html spec does not seem to restrict the contents of the name attribute:

Other than isindex, any non-empty value for name is allowed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions