Bug Tracker

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#13894 closed bug (fixed)

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

Reported by: kc0dhb@… 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

Change History (6)

comment:1 Changed 4 years ago by gibson042

Owner: set to gibson042
Status: newassigned

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

comment:2 Changed 4 years ago by dmethvin

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

comment:3 Changed 4 years ago by gibson042

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.

comment:4 Changed 4 years ago by Richard Gibson

Resolution: fixed
Status: assignedclosed

Fix #13894: CSS identifiers with backslash-escaped whitespace (cherry picked from commit a75016634d439179fa6517da1918a5a667886e99)

Changeset: 2f2e045ea66f320eee62b149a6b11f22aadb816b

comment:5 Changed 4 years ago by gibson042

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...

comment:6 Changed 4 years ago by dmethvin

Component: unfiledselector
Milestone: None1.10
Priority: undecidedlow
Note: See TracTickets for help on using tickets.