Skip to main content

Bug Tracker

Side navigation

#3831 closed bug (fixed)

Opened January 13, 2009 01:29AM UTC

Closed January 13, 2009 03:06PM UTC

jQuery 1.3 doesn't accept spaces in attributes brackets selectors

Reported by: brizbane Owned by: john
Priority: major Milestone: 1.3
Component: selector Version: 1.2.6
Keywords: spaces, selector Cc:
Blocked by: Blocking:

1.2.6 accepts spaces anywhere within the bracket selectors:

$('a[ name ]') or $('a[name = "foo"]') or $('a[ name*="foo" ]')

1.3 does not allow any spaces at all, erroring out with "Syntax error, unrecognized expression: [ name ]". I suspect many scripts will break.

Here's a test page (combined with another issue):

Attachments (0)
Change History (1)

Changed January 13, 2009 03:06PM UTC by john comment:1

resolution: → fixed
status: newclosed

Just landed a fix for this:

Will be merging into jQuery shortly.