generating correct url for tag autocomplete