escape invalid chars in file link URLs