mshtml: Strip hash part before combining URIs.
This commit is contained in:
parent
323bec99b3
commit
8c6d9482bc
|
@ -141,6 +141,23 @@ static BOOL compare_ignoring_frag(IUri *uri1, IUri *uri2)
|
||||||
return ret;
|
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 nsresult create_nsuri(IUri*,HTMLOuterWindow*,NSContainer*,const char*,nsWineURI**);
|
||||||
|
|
||||||
static const char *debugstr_nsacstr(const nsACString *nsstr)
|
static const char *debugstr_nsacstr(const nsACString *nsstr)
|
||||||
|
@ -2407,12 +2424,10 @@ static nsresult NSAPI nsURI_Resolve(nsIFileURL *iface, const nsACString *aRelati
|
||||||
if(!path)
|
if(!path)
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
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);
|
heap_free(path);
|
||||||
if(FAILED(hres)) {
|
if(FAILED(hres))
|
||||||
ERR("CoIntenetCombineUrlEx failed: %08x\n", hres);
|
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
|
||||||
|
|
||||||
hres = IUri_GetDisplayUri(new_uri, &ret);
|
hres = IUri_GetDisplayUri(new_uri, &ret);
|
||||||
IUri_Release(new_uri);
|
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));
|
MultiByteToWideChar(CP_ACP, 0, spec, -1, new_spec, sizeof(new_spec)/sizeof(WCHAR));
|
||||||
|
|
||||||
if(base_wine_uri) {
|
if(base_wine_uri) {
|
||||||
hres = CoInternetCombineUrlEx(base_wine_uri->uri, new_spec, URL_ESCAPE_SPACES_ONLY|URL_DONT_ESCAPE_EXTRA_INFO,
|
hres = combine_url(base_wine_uri->uri, new_spec, &urlmon_uri);
|
||||||
&urlmon_uri, 0);
|
|
||||||
if(FAILED(hres))
|
|
||||||
WARN("CoInternetCombineUrlEx failed: %08x\n", hres);
|
|
||||||
}else {
|
}else {
|
||||||
hres = create_uri(new_spec, 0, &urlmon_uri);
|
hres = create_uri(new_spec, 0, &urlmon_uri);
|
||||||
if(FAILED(hres))
|
if(FAILED(hres))
|
||||||
|
|
Loading…
Reference in New Issue