From 7e8c2cc4a5e80cc4ff8e55a3eb4ade4d6e5b0a11 Mon Sep 17 00:00:00 2001 From: Rick Nelson Date: Wed, 16 Sep 2015 00:26:33 +0200 Subject: [PATCH] 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. --- src/html/winpars.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/html/winpars.cpp b/src/html/winpars.cpp index ac5c5ecfbe..4108eb1873 100644 --- a/src/html/winpars.cpp +++ b/src/html/winpars.cpp @@ -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; }