Fixes #83218: We shorten the cnames as part of the sanitizing process, a...

...s geoserver doesn't seem to like long names, and we add a pretty long UUID, so it tended to broke.

Also, we don't resanitize if we detect an already clean text.