Fixed url parsing in js.