Fix input selector bug

When the input[name=...] selector is used, the part for name needed to
be quoted to avoid certain edge cases from throwing an error (e.g. a
name with square brackets or other non-alphanumeric characters in it).