Skip to content

Counting braces doesn't work with attribute matching #1

@perry-mitchell

Description

@perry-mitchell

The solution used is great for simple selectors, but doesn't hold up when using attribute selectors with values that contain braces.

For instance the following works:

console.log(splitSelectors('img[alt^="[text]"],div.test'))

But this does not:

console.log(splitSelectors('img[alt^="[text"],div.test'))

(notice the missing closing square brace inside the double quotes)

Although this may seem pedantic, this could occur within more dynamic applications that rely on user input or dynamic values.

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