Skip to main content

Bug Tracker

Side navigation

#9625 closed enhancement (invalid)

Opened June 20, 2011 03:30PM UTC

Closed June 20, 2011 04:47PM UTC

Support full range of allowed IDs in HTML5

Reported by: ssp Owned by:
Priority: high Milestone: 1.next
Component: selector Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:
Description

HTML5 seems to legalise all non-space characters for ID strings.

This creates a situation where you can have IDs which jQuery cannot match because its 'quickExpr' regular expression matches according to the more restrictive HTML4 standard.

See http://jsfiddle.net/2Zpn4/4/ for an example showing that document.getElementByID can return elements which JQuery cannot match.

Attachments (0)
Change History (3)

Changed June 20, 2011 04:02PM UTC by rwaldron comment:1

_comment0: the /TR/ spec pages should not be used as reference as they are considered "trash" and exist only for record1308585779066182
component: unfiledselector
priority: undecidedhigh

the /TR/ spec pages should not be used as reference as they are considered "trash" and exist only for record

The correct reference would be:

http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#the-id-attribute

Changed June 20, 2011 04:34PM UTC by rwaldron comment:2

As a note, attribute selectors _do_ work here:

http://jsfiddle.net/rwaldron/2Zpn4/8/

Changed June 20, 2011 04:47PM UTC by dmethvin comment:3

resolution: → invalid
status: newclosed

Just need to escape the special chars.

http://jsfiddle.net/2Zpn4/6/