format URL before saving it into the links slice