Remove bad characters from paste