mapbox/tilemill — pull request #1854 by yohanboniface (2013-01-01 14:52:47+00:00)
Title: [ui] Fix "*" link not working in carto reference (see mapbox/tilemill#1693)

I run into this [little annoying bug](https://github.com/mapbox/tilemill/issues/1693) today, so here is a quick patch.

The ["*" mapnik-reference symbolizer](https://github.com/mapnik/mapnik-reference/blob/master/latest/reference.json#L145) causes a `section-*` className to be created and then queried with jQuery selector, while `*` is a [metacharacter](http://api.jquery.com/category/selectors/) for jQuery.

I'm not aware of some escape method in jQuery itself, hence some ad hoc solution seemed needed.
Thus, I've seen four solutions:
- change value in mapnik-reference
- fix input while importing it from mapnik-reference (say "*" become "all")
- do a proper "selectorEscape" that escape every metacharacter and use it where needed (in `view.toggler`, almost)
- just escape `*` where needed (in `view.toggler`)

Having no overview of tilemill internal, I thought the last solution was enough, but I may be wrong. ;)

Thanks!

Yohan