Question: ```
jQuery("input[name=a.b.c]")

```

Executing this line using jQuery 1.10.2 or 1.9.1 results in the message:

"Syntax error, unrecognized expression: input:hidden[name=a.b.c]".

**I understand the core problem** which is that the dots are not escaped or quoted out. This would work:

```
jQuery("input[name='a.b.c']")

```

The constraint is that I do not have the ability to change the line of code with the bad selector. That line is produced by the website (which I don't own) and they don't give me the ability to change that. 

However, they do allow me to add arbitrary JS files to the header of the page (which means I can use a different jQuery version or even edit the jQuery file). My question is whether anyone knows another way around this so that jQuery can cope without the quotes since I cannot change the bad code.

For those saying that I can just change the name, this doesn't help because the JS still throws an error because changing the name of the element doesn't fix the bad selector.

Thanks

Answer: 
Take a look here. 

[How do I extend jQuery's selector engine to warn me when a selector is not found?](https://stackoverflow.com/questions/5744997/how-do-i-extend-jquerys-selector-engine-to-warn-me-when-a-selector-is-not-found)

In your case I would do something like this.

```
var oldInit = $.fn.init;
$.fn.init = function(selector, context, rootjQuery) {
    selector = fixItWithQuotes(selector, context, rootjQuery);
    return new oldInit(selector, context, rootjQuery);
};

```

untested by me, but it should give you an idea.
Also, this might give you more ideas? 

<http://blog.tallan.com/2012/01/17/customizing-the-default-jquery-selector-behavior/> 

Hope that makes sense.
Why don't you change the name attribute yourself?

```
var el = $("input"); 
el.attr("name", el.attr("name").replace(/[\d\.]+/g, "")); 
console.log(el.attr("name"));

```

Then change it back if you need to. jsFiddle [here](http://jsfiddle.net/qksmG/)