Skip to main content

Bug Tracker

Side navigation

#13894 closed bug (fixed)

Opened May 14, 2013 11:44PM UTC

Closed May 16, 2013 01:26AM UTC

Last modified May 16, 2013 02:10AM UTC

.children does not return direct child, but .find does [Firefox only]

Reported by: kc0dhb@gmail.com Owned by: gibson042
Priority: low Milestone: 1.10
Component: selector Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:
Description

Broken in 1.9.1 and 2.0 on Firefox.

This works correctly in 1.8.3 and earlier.

This works correctly in 1.9.1 in chrome and IE9/10.

Fiddle: http://jsfiddle.net/d3KR4/4/

Basically an escaped space (possibly other characters) in an attribute selector works with .find, but not .children.

Also appears that having an element before the target with a space is necessary to reproduce in 1.x (edge), but is not necessary in 1.9.1

Attachments (0)
Change History (6)

Changed May 15, 2013 01:19PM UTC by gibson042 comment:1

owner: → gibson042
status: newassigned

Erroneous behavior confirmed. I'll look into this today.

Changed May 15, 2013 02:02PM UTC by dmethvin comment:2

Shouldn't those attributes *always* be quoted? http://mathiasbynens.be/notes/unquoted-attribute-values

Changed May 15, 2013 02:12PM UTC by gibson042 comment:3

It's certainly ''best'' to quote, but the spec allows identifiers, which can include escaped characters:

Any character (except a hexadecimal digit, linefeed, carriage return, or form feed) can be escaped with a backslash to remove its special meaning.

Changed May 16, 2013 01:26AM UTC by Richard Gibson comment:4

resolution: → fixed
status: assignedclosed

Fix #13894: CSS identifiers with backslash-escaped whitespace

(cherry picked from commit a75016634d439179fa6517da1918a5a667886e99)

Changeset: 2f2e045ea66f320eee62b149a6b11f22aadb816b

Changed May 16, 2013 01:44AM UTC by gibson042 comment:5

As it turns out, Firefox does the wrong thing when numerically interpreting "0x": https://bugzilla.mozilla.org/show_bug.cgi?id=872853

I can't wait to lose this extra code...

Changed May 16, 2013 02:10AM UTC by dmethvin comment:6

component: unfiledselector
milestone: None1.10
priority: undecidedlow