id summary reporter owner description type status priority milestone component version resolution keywords cc blockedby blocking 110 Multiple Attribute Selectors Broken john "I was having trouble with the form plugin and while debugging I discovered that quotes are necessary when selecting by attribute values * if * the selection contains more than one item. The following test page shows this more clearly:
The first alert shows 2, the second alert shows 0. However the following lines will both correctly alert 1: alert(""with quotes: "" +$(""input[@type='hidden']"").size()); alert(""w/o quotes: "" +$(""input[@type=hidden]"").size()); So there is either a bug in the selection logic (if quotes are not meant to be required) or in the form plugin which does this: $(""input[@type=submit],input[@type=image]"", this) ---- This W3C page says ""Attribute values must be identifiers or strings"" so it seems the quotes should be optional for simple names. It looks like the problem is here in .filter(): // Look for something (optionally) enclosed with quotes .replace( 'Q', "" *'?""?([^'""]*)'?""? *"" ), ""i"" ); I think the [^'""]* part of the regexp is eating up too much of the selector string." bug closed major 1.0 core 1.0 fixed