removes invalid percent encodings