Is there a way to automatically encode urls?