Fixed some bug in processing url in api.digipal.js