Trim content for possible evasion of hidden invalid chars.