I see, I didn't realise that `'` was a valid html input name character.

I found a possible solution at http://stackoverflow.com/questions/2364982/jquery-selector-for-inputs-with-square-brackets-in-the-name-attribute. Is it worth complicating the code to handle html input names with quotes in it?