make sure ref.url is valid url (otherwise err at publication)