Skip to content

matchByName() breaks when name contains a '.' #25

Open
@sithy

Description

@sithy

Using jQuery 1.5.1 I encountered an issue with data link when my input names had dots inside the name.
The exception that Chrome was throwing was from sizzle 'Uncaught Syntax error, unrecognized expression: [name=Domain.BusinessRelationship]'

I believe I found the issue and the fix, inside matchByName there are no single quotes around the name element, adding those in the error goes away and the link works as expected.

    function matchByName(name) {
        var selector = "[name='" + name + "'], [id='" + name +"']";
        // include elements in this set that match as well a child matches
        return self.filter(selector).add(self.find(selector));
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions