Commit 8c6d9482 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Strip hash part before combining URIs.

parent 323bec99
......@@ -141,6 +141,23 @@ static BOOL compare_ignoring_frag(IUri *uri1, IUri *uri2)
return ret;
}
static HRESULT combine_url(IUri *base_uri, const WCHAR *rel_url, IUri **ret)
{
IUri *uri_nofrag;
HRESULT hres;
uri_nofrag = get_uri_nofrag(base_uri);
if(!uri_nofrag)
return E_FAIL;
hres = CoInternetCombineUrlEx(uri_nofrag, rel_url, URL_ESCAPE_SPACES_ONLY|URL_DONT_ESCAPE_EXTRA_INFO,
ret, 0);
IUri_Release(uri_nofrag);
if(FAILED(hres))
WARN("CoInternetCombineUrlEx failed: %08x\n", hres);
return hres;
}
static nsresult create_nsuri(IUri*,HTMLOuterWindow*,NSContainer*,const char*,nsWineURI**);
static const char *debugstr_nsacstr(const nsACString *nsstr)
......@@ -2407,12 +2424,10 @@ static nsresult NSAPI nsURI_Resolve(nsIFileURL *iface, const nsACString *aRelati
if(!path)
return NS_ERROR_OUT_OF_MEMORY;
hres = CoInternetCombineUrlEx(This->uri, path, URL_ESCAPE_SPACES_ONLY|URL_DONT_ESCAPE_EXTRA_INFO, &new_uri, 0);
hres = combine_url(This->uri, path, &new_uri);
heap_free(path);
if(FAILED(hres)) {
ERR("CoIntenetCombineUrlEx failed: %08x\n", hres);
if(FAILED(hres))
return NS_ERROR_FAILURE;
}
hres = IUri_GetDisplayUri(new_uri, &ret);
IUri_Release(new_uri);
......@@ -3317,10 +3332,7 @@ static nsresult NSAPI nsIOService_NewURI(nsIIOService *iface, const nsACString *
MultiByteToWideChar(CP_ACP, 0, spec, -1, new_spec, sizeof(new_spec)/sizeof(WCHAR));
if(base_wine_uri) {
hres = CoInternetCombineUrlEx(base_wine_uri->uri, new_spec, URL_ESCAPE_SPACES_ONLY|URL_DONT_ESCAPE_EXTRA_INFO,
&urlmon_uri, 0);
if(FAILED(hres))
WARN("CoInternetCombineUrlEx failed: %08x\n", hres);
hres = combine_url(base_wine_uri->uri, new_spec, &urlmon_uri);
}else {
hres = create_uri(new_spec, 0, &urlmon_uri);
if(FAILED(hres))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment