Better string escaping. Fixes graph view

This even fixes the missing bottom corner of the graph.
Must be tested toroughly before merge.
The string api is a mess, this is a (good?) workaround.
Smells like black magic.