make sure that id string is valid

jQuery seems to have some problems with ids containing characters
like '[', which are common in names generated by rails
Merge branch 'form_helper' into my_release