openlayers/openlayers — pull request #866 by marcjansen (2013-02-04 15:42:42+00:00)
Title: LayerSwitcher generate bad ID when layername has spaces in it.

Hello,

I'm the maintainer of the [OpenLayers module for Drupal](http://drupal.org/project/openlayers).
This morning, someone reported a bug and I'm reporting it because it's not Drupal related.
I checked in the issue queue to see if it has alreay been reported and I didn't find anything.

When a layername has spaces in it, the Layer Switcher control generates bad id's.

Demo [here](http://jsbin.com/ecuwes/1/edit), open the layerswitcher, then check the ids of the radio with Firebug.

I think the code that handle this is [here](https://github.com/openlayers/openlayers/blob/master/lib/OpenLayers/Control/LayerSwitcher.js#L329).