Try to replace all possible invalid characters