Bug Tracker

Opened 9 years ago

Closed 9 years ago

#6665 closed feature (invalid)

Selector problem

Reported by: Beho Double Owned by:
Priority: Milestone:
Component: selector Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:

Description

$("#test-test") works

$("#test,test") works

$("#test.test") works

$("#4-4") works

$("#4,4") doesn't work

$("#4.4") doesn't work

while

getElementById("4,4") works

getElementById("4.4") works

Change History (1)

comment:1 Changed 9 years ago by dmethvin

Resolution: invalid
Status: newclosed

You need to escape the comma with
in the string.

BTW, a number alone is not a valid id, and a comma in an id is not valid either. But jQuery will allow you to include it by escaping with backslash.

http://www.w3.org/TR/html4/types.html#h-6.2

ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").

Note: See TracTickets for help on using tickets.