Some exported codes couldn't compile in JavaFX due to spaces and minus signs on id labels. The sanatize function creates a new string with them replaced by underscores, solving the problem.

Diff agains revision 20175.