make uri opening safe