put-selector icon indicating copy to clipboard operation
put-selector copied to clipboard

Error: Unexpected character ']' when adding an attribute that contains ']'

Open tannerlyons opened this issue 9 years ago • 2 comments

Here's the simplest repro:

listItem = put(document.body, "div");
put(listItem, "input[type=text][title=[surrounded by brackets]]");

https://jsfiddle.net/tannermeans/utjtgaa3/7/

Seems like these characters should be allowed - or is there another way to do this?

tannerlyons avatar Feb 10 '16 18:02 tannerlyons

You can do:

put(listItem, "input[type=text][title=$]", "[surrounded by brackets]")

But I think I see where the parsing error is occurring.

kriszyp avatar Feb 10 '16 19:02 kriszyp

Ahh thanks for the quick reply and alternate method!

tannerlyons avatar Feb 10 '16 19:02 tannerlyons