+ // if not absolute then ...
+ if( current.IsReference() )
+ {
+ wxString basepath = GetFS()->GetPath();
+ wxURI base(basepath);
+
+ // ... try to apply base path if valid ...
+ if( !base.IsReference() )
+ {
+ wxURI path(myfullurl);
+ path.Resolve( base );
+ myfullurl = path.BuildUnescapedURI();
+ }
+ else
+ {
+ // ... or force such addition if not included already
+ if( !current.GetPath().Contains(base.GetPath()) )
+ {
+ basepath += myurl;
+ wxURI connected( basepath );
+ myfullurl = connected.BuildUnescapedURI();
+ }
+ }
+ }
+
+ wxString redirect;
+ status = m_windowInterface->OnHTMLOpeningURL(type, myfullurl, &redirect);
+ if ( status != wxHTML_REDIRECT )
+ break;
+
+ myurl = redirect;
+ }
+
+ if ( status == wxHTML_BLOCK )
+ return NULL;
+
+ int flags = wxFS_READ;
+ if (type == wxHTML_URL_IMAGE)
+ flags |= wxFS_SEEKABLE;
+
+ return GetFS()->OpenFile(myurl, flags);
+}
+
+void wxHtmlWinParser::AddText(const wxString& txt)