#include "wx/mimetype.h"
#include "wx/filename.h"
#include "wx/tokenzr.h"
+#include "wx/uri.h"
#include "wx/private/fileback.h"
// ----------------------------------------------------------------------------
path = path.Mid(2);
#endif
- path.Replace(wxT("%25"), wxT("%"));
- path.Replace(wxT("%3A"), wxT(":"));
+ path = wxURI::Unescape(path);
#ifdef __WXMSW__
// file urls either start with a forward slash (local harddisk),
#endif
url.Replace(g_nativePathString, g_unixPathString);
- url.Replace(wxT("%"), wxT("%25"));
+ url.Replace(wxT("%"), wxT("%25")); // '%'s must be replaced first!
+ url.Replace(wxT("#"), wxT("%23"));
url.Replace(wxT(":"), wxT("%3A"));
url = wxT("file:") + url;
return url;