Add custom function for encoding url