Escape the optgroup labels during initialization step.

@pfiller here is the fix for the master branch. Will have to create one other for the harvest_experimental branch, just in case someone will overwrite the fixes we have in the harvestapp repo.