wxURI is enough for the basic url operations.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31103 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
1296186133
commit
7e49601492
@ -11,7 +11,6 @@
|
||||
<wx-lib>gizmos</wx-lib>
|
||||
<wx-lib>html</wx-lib>
|
||||
<wx-lib>core</wx-lib>
|
||||
<wx-lib>net</wx-lib>
|
||||
<wx-lib>base</wx-lib>
|
||||
</exe>
|
||||
|
||||
|
@ -23,7 +23,6 @@
|
||||
<wx-lib>adv</wx-lib>
|
||||
<wx-lib>html</wx-lib>
|
||||
<wx-lib>core</wx-lib>
|
||||
<wx-lib>net</wx-lib>
|
||||
<wx-lib>base</wx-lib>
|
||||
<win32-res>studio.rc</win32-res>
|
||||
</exe>
|
||||
|
@ -23,7 +23,6 @@
|
||||
<wx-lib>html</wx-lib>
|
||||
<wx-lib>core</wx-lib>
|
||||
<wx-lib>xml</wx-lib>
|
||||
<wx-lib>net</wx-lib>
|
||||
<wx-lib>base</wx-lib>
|
||||
<win32-res>wxrcedit.rc</win32-res>
|
||||
<ldlibs>$(EXTRALIBS_XML)</ldlibs>
|
||||
|
@ -19,7 +19,6 @@
|
||||
<wx-lib>odbc</wx-lib>
|
||||
<wx-lib>html</wx-lib>
|
||||
<wx-lib>core</wx-lib>
|
||||
<wx-lib>net</wx-lib>
|
||||
<wx-lib>base</wx-lib>
|
||||
<win32-res>dbbrowse.rc</win32-res>
|
||||
</exe>
|
||||
|
@ -17,7 +17,6 @@
|
||||
<wx-lib>html</wx-lib>
|
||||
<wx-lib>adv</wx-lib>
|
||||
<wx-lib>core</wx-lib>
|
||||
<wx-lib>net</wx-lib>
|
||||
<wx-lib>base</wx-lib>
|
||||
<win32-res>forty.rc</win32-res>
|
||||
</exe>
|
||||
|
@ -7,7 +7,6 @@
|
||||
<sources>wxpoem.cpp</sources>
|
||||
<wx-lib>html</wx-lib>
|
||||
<wx-lib>core</wx-lib>
|
||||
<wx-lib>net</wx-lib>
|
||||
<wx-lib>base</wx-lib>
|
||||
<win32-res>wxpoem.rc</win32-res>
|
||||
</exe>
|
||||
|
@ -7,7 +7,6 @@
|
||||
<sources>demo.cpp</sources>
|
||||
<wx-lib>html</wx-lib>
|
||||
<wx-lib>core</wx-lib>
|
||||
<wx-lib>net</wx-lib>
|
||||
<wx-lib>base</wx-lib>
|
||||
<win32-res>demo.rc</win32-res>
|
||||
</exe>
|
||||
|
@ -7,7 +7,6 @@
|
||||
<sources>htlbox.cpp</sources>
|
||||
<wx-lib>html</wx-lib>
|
||||
<wx-lib>core</wx-lib>
|
||||
<wx-lib>net</wx-lib>
|
||||
<wx-lib>base</wx-lib>
|
||||
<win32-res>htlbox.rc</win32-res>
|
||||
</exe>
|
||||
|
@ -9,7 +9,6 @@
|
||||
<sources>about.cpp</sources>
|
||||
<wx-lib>html</wx-lib>
|
||||
<wx-lib>core</wx-lib>
|
||||
<wx-lib>net</wx-lib>
|
||||
<wx-lib>base</wx-lib>
|
||||
<win32-res>about.rc</win32-res>
|
||||
</exe>
|
||||
|
@ -9,7 +9,6 @@
|
||||
<sources>help.cpp</sources>
|
||||
<wx-lib>html</wx-lib>
|
||||
<wx-lib>core</wx-lib>
|
||||
<wx-lib>net</wx-lib>
|
||||
<wx-lib>base</wx-lib>
|
||||
<win32-res>help.rc</win32-res>
|
||||
</exe>
|
||||
|
@ -9,7 +9,6 @@
|
||||
<sources>helpview.cpp</sources>
|
||||
<wx-lib>html</wx-lib>
|
||||
<wx-lib>core</wx-lib>
|
||||
<wx-lib>net</wx-lib>
|
||||
<wx-lib>base</wx-lib>
|
||||
<win32-res>helpview.rc</win32-res>
|
||||
</exe>
|
||||
|
@ -9,7 +9,6 @@
|
||||
<sources>printing.cpp</sources>
|
||||
<wx-lib>html</wx-lib>
|
||||
<wx-lib>core</wx-lib>
|
||||
<wx-lib>net</wx-lib>
|
||||
<wx-lib>base</wx-lib>
|
||||
<wx-lib>adv</wx-lib>
|
||||
<win32-res>printing.rc</win32-res>
|
||||
|
@ -9,7 +9,6 @@
|
||||
<sources>virtual.cpp</sources>
|
||||
<wx-lib>html</wx-lib>
|
||||
<wx-lib>core</wx-lib>
|
||||
<wx-lib>net</wx-lib>
|
||||
<wx-lib>base</wx-lib>
|
||||
<win32-res>virtual.rc</win32-res>
|
||||
</exe>
|
||||
|
@ -9,7 +9,6 @@
|
||||
<sources>widget.cpp</sources>
|
||||
<wx-lib>html</wx-lib>
|
||||
<wx-lib>core</wx-lib>
|
||||
<wx-lib>net</wx-lib>
|
||||
<wx-lib>base</wx-lib>
|
||||
<win32-res>widget.rc</win32-res>
|
||||
</exe>
|
||||
|
@ -9,7 +9,6 @@
|
||||
<sources>zip.cpp</sources>
|
||||
<wx-lib>html</wx-lib>
|
||||
<wx-lib>core</wx-lib>
|
||||
<wx-lib>net</wx-lib>
|
||||
<wx-lib>base</wx-lib>
|
||||
<win32-res>zip.rc</win32-res>
|
||||
</exe>
|
||||
|
@ -15,7 +15,6 @@
|
||||
<wx-lib>adv</wx-lib>
|
||||
<wx-lib>core</wx-lib>
|
||||
<wx-lib>xml</wx-lib>
|
||||
<wx-lib>net</wx-lib>
|
||||
<wx-lib>base</wx-lib>
|
||||
<win32-res>xrcdemo.rc</win32-res>
|
||||
</exe>
|
||||
|
@ -257,36 +257,34 @@ wxFSFile *wxHtmlWinParser::OpenURL(wxHtmlURLType type,
|
||||
{
|
||||
wxString myfullurl(myurl);
|
||||
|
||||
#if wxUSE_URL
|
||||
// consider url as absolute path first
|
||||
wxURL current(wxURL::Unescape(myurl));
|
||||
myfullurl = current.GetURL();
|
||||
wxURI current(myurl);
|
||||
myfullurl = current.BuildUnescapedURI();
|
||||
|
||||
// if not absolute then ...
|
||||
if( current.IsReference() )
|
||||
{
|
||||
wxString basepath = GetFS()->GetPath();
|
||||
wxURI base(wxURL::Unescape(basepath));
|
||||
wxURI base(basepath);
|
||||
|
||||
// try to apply base path if valid ...
|
||||
// ... try to apply base path if valid ...
|
||||
if( !base.IsReference() )
|
||||
{
|
||||
wxURI path(myfullurl);
|
||||
path.Resolve( base );
|
||||
myfullurl = path.BuildURI();
|
||||
myfullurl = path.BuildUnescapedURI();
|
||||
}
|
||||
else
|
||||
{
|
||||
// ... or force such addition if not included already
|
||||
if( !current.GetURL().Contains(basepath) )
|
||||
if( !current.GetPath().Contains(base.GetPath()) )
|
||||
{
|
||||
basepath += myurl;
|
||||
wxURL connected( wxURL::Unescape(basepath) );
|
||||
myfullurl = connected.GetURL();
|
||||
wxURI connected( basepath );
|
||||
myfullurl = connected.BuildUnescapedURI();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
wxString redirect;
|
||||
status = m_Window->OnOpeningURL(type, myfullurl, &redirect);
|
||||
|
@ -27,7 +27,6 @@
|
||||
<wx-lib>html</wx-lib>
|
||||
<wx-lib>core</wx-lib>
|
||||
<wx-lib>xml</wx-lib>
|
||||
<wx-lib>net</wx-lib>
|
||||
<wx-lib>base</wx-lib>
|
||||
</exe>
|
||||
|
||||
|
@ -12,7 +12,6 @@
|
||||
<win32-res>hhp2cached.rc</win32-res>
|
||||
<wx-lib>html</wx-lib>
|
||||
<wx-lib>core</wx-lib>
|
||||
<wx-lib>net</wx-lib>
|
||||
<wx-lib>base</wx-lib>
|
||||
<install-to>$(BINDIR)</install-to>
|
||||
</exe>
|
||||
|
@ -30,7 +30,6 @@
|
||||
<sources>$(TEX2RTF_SRC)</sources>
|
||||
<wx-lib>html</wx-lib>
|
||||
<wx-lib>core</wx-lib>
|
||||
<wx-lib>net</wx-lib>
|
||||
<wx-lib>base</wx-lib>
|
||||
<install-to>$(BINDIR)</install-to>
|
||||
</exe>
|
||||
|
Loading…
Reference in New Issue
Block a user