diff --git a/include/wx/uri.h b/include/wx/uri.h index 7653fdaca4..11bbd770f6 100644 --- a/include/wx/uri.h +++ b/include/wx/uri.h @@ -107,6 +107,7 @@ public: void Resolve(const wxURI& base, int flags = wxURI_STRICT); bool IsReference() const; + bool IsRelative() const; protected: void Clear(); diff --git a/src/common/uri.cpp b/src/common/uri.cpp index c237c1dd6a..f5011f737c 100644 --- a/src/common/uri.cpp +++ b/src/common/uri.cpp @@ -313,6 +313,17 @@ bool wxURI::IsReference() const return !HasScheme() || !HasServer(); } +// --------------------------------------------------------------------------- +// IsRelative +// +// FIXME: may need refinement +// --------------------------------------------------------------------------- + +bool wxURI::IsRelative() const +{ + return !HasScheme() && !HasServer(); +} + // --------------------------------------------------------------------------- // Parse // diff --git a/src/html/winpars.cpp b/src/html/winpars.cpp index c862b9cd60..b085fdce4d 100644 --- a/src/html/winpars.cpp +++ b/src/html/winpars.cpp @@ -296,7 +296,7 @@ wxFSFile *wxHtmlWinParser::OpenURL(wxHtmlURLType type, myfullurl = current.BuildURI(); // if not absolute then ... - if( current.IsReference() ) + if( current.IsRelative() ) { wxString basepath = GetFS()->GetPath(); wxURI base(basepath);