fixed url parsing for urls which contain ]