put-selector
put-selector copied to clipboard
Error: Unexpected character ']' when adding an attribute that contains ']'
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?
You can do:
put(listItem, "input[type=text][title=$]", "[surrounded by brackets]")
But I think I see where the parsing error is occurring.
Ahh thanks for the quick reply and alternate method!