+wxFSFile *wxHtmlWinParser::OpenURL(wxHtmlURLType type,
+ const wxString& url) const
+{
+ // FIXME - normalize the URL to full path before passing to
+ // OnOpeningURL!!
+ if ( m_Window )
+ {
+ wxString myurl(url);
+ wxHtmlOpeningStatus status;
+ for (;;)
+ {
+ wxString redirect;
+ status = m_Window->OnOpeningURL(type, myurl, &redirect);
+ if ( status != wxHTML_REDIRECT )
+ break;
+
+ myurl = redirect;
+ }
+
+ if ( status == wxHTML_BLOCK )
+ return NULL;
+
+ return GetFS()->OpenFile(myurl);
+ }