Skip to content

netteForms: Nette.toggle back compatibility #212

@solcik

Description

@solcik

Version: 3.0.1

Bug Description

The bug was introduced in this commit d862717#diff-31d0814231016345eaa29e9607fc0c15R658

Nette.toggle back compatibility (regex) for id selector is broken.

As per https://www.w3.org/TR/html4/types.html#type-id

ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").

Steps To Reproduce

Nette forms ids are generated - for example: "frm-exampleForm-form-exampleField". This id is not supported by regex.

Expected Behavior

Proper back compatibility.

Possible Solution

Change the regex to:

/^\w[\w\d-_.,]*$/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions