Fix handling of relative URLs starting with "/" in wxHTML

Don't interpret them relatively to the current path, so that an URL like
"/pictures/foo.png" in the file "/webpages/bar.html" is resolved correctly and
not as "/webpages/pictures/foo.png" as it was previously.

See #17148.
This commit is contained in:
Rick Nelson 2015-09-16 00:26:33 +02:00 committed by Vadim Zeitlin
parent 7851535d02
commit 7e8c2cc4a5

View File

@ -323,7 +323,10 @@ wxFSFile *wxHtmlWinParser::OpenURL(wxHtmlURLType type,
wxString redirect;
status = m_windowInterface->OnHTMLOpeningURL(type, myfullurl, &redirect);
if ( status != wxHTML_REDIRECT )
{
myurl = myfullurl;
break;
}
myurl = redirect;
}