Remove trailing and leading whitespaces from id and title on rename.