This project is archived and is in readonly mode.

#1013 ✓resolved
Tim Wienk and funny characters in the ID

Reported by Tim Wienk | September 21st, 2010 @ 04:11 PM | in 1.3.0 rc2 (closed)

According to the HTML5 spec, IDs can contain anything but spaces now. The current implementation doesn't take that into account:

Expected behaviour:'a.b') implies that the string that is passed is nothing other than an ID. So it should find an element with id="a.b".

Current behaviour:'a.b') passes the selector to slick as #a.b. Which parses that to an ID and a ClassName.


Throw replace(/(\W)/g, '\\$1') at the string that is passed to

Extra info:

  • document.getElementById does find the elements
  • it works in 1.2.4.
  • in CSS characters are escapeable: #a\.b, so for getElements and $$ we're good. You just have to keep in mind that you have to escape \ the \\ to not parse the \.: $$('#a\\.b'). (That may be good to mention in the docs.)

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket

Referenced by