CustomTreeControl Escaping edit node label causes inconsistent state on Linux

I refactored/merged this files, and did minimal testing with their included demos.
Also my RIDE app worked OK.

This is the Pull Request
It would be nice if the original author could review it.