Normalizes the URLs before saving in database.