Opened 10 years ago
Closed 10 years ago
#12701 closed bug (notabug)
Cannot use arbitrary characters in id selectors for html5
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | selector | Version: | git |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Hi there,
I've noticed that code like this doesn't work:
$('<div id="foo~edit">').is('#foo\~edit') http://jsfiddle.net/t6C5h/
Even though the html5 spec allows such ids and specifies for them to be escaped with \ where appropriate.
Regards, Martin
Change History (2)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
Component: | unfiled → selector |
---|---|
Resolution: | → notabug |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Works: http://jsfiddle.net/t6C5h/1/
See jQuery documentation on how to escape meta-chars in selectors: http://api.jquery.com/category/selectors/