Converts special characters to spaces, trims spaces and control codes at start and end