Properly format the title string.