Skip to main content

Bug Tracker

Side navigation

#6665 closed feature (invalid)

Opened June 13, 2010 09:17PM UTC

Closed June 13, 2010 10:58PM UTC

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

Attachments (0)
Change History (1)

Changed June 13, 2010 10:58PM UTC by dmethvin comment:1

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 (".").