twitter/bootstrap — pull request #4034 by Dattaya (2012-07-08 10:34:49+00:00)
Title: Scrollspy. Allow to use 'dot', 'colon' and another characters inside the 'id' attribute.

HTML4 spec lets to use 'dot' and 'colon' - http://www.w3.org/TR/html4/types.html#type-name, HTML5 - all characters - http://www.w3.org/TR/html5/global-attributes.html#the-id-attribute.

This solution isn't perfect, still some characters prevent from selecting an element from the dom tree.
If you want I can add tests.