From 0423bdc761a76f7d0ccbb91fd5674b9306494d62 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 28 Jan 2002 01:39:55 +0000 Subject: [PATCH] fixed code in OpenURL() to actually use the result of OnOpeningURL() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13870 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/html/winpars.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/html/winpars.cpp b/src/html/winpars.cpp index 86dbfd1b90..151573bd3f 100644 --- a/src/html/winpars.cpp +++ b/src/html/winpars.cpp @@ -180,24 +180,25 @@ wxObject* wxHtmlWinParser::GetProduct() return top; } -wxFSFile *wxHtmlWinParser::OpenURL(wxHtmlURLType type, +wxFSFile *wxHtmlWinParser::OpenURL(wxHtmlURLType type, const wxString& url) const { // FIXME - normalize the URL to full path before passing to // OnOpeningURL!! if ( m_Window ) { - wxString redirect; wxString myurl(url); wxHtmlOpeningStatus status; for (;;) { - if ( m_Window->OnOpeningURL(type, myurl, &redirect) == wxHTML_REDIRECT ) - myurl = redirect; - else + wxString redirect; + status = m_Window->OnOpeningURL(type, myurl, &redirect); + if ( status != wxHTML_REDIRECT ) break; + + myurl = redirect; } - + if ( status == wxHTML_BLOCK ) return NULL; else -- 2.45.2