]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filesys.cpp
don't encode collons in file:// URLs under Windows as IE is incapable of opening...
[wxWidgets.git] / src / common / filesys.cpp
index 038e55407fb989b4b18b83a29f7c535414c3bdaf..9048f988c091c97f94f1ef05dc0554e6205d6421 100644 (file)
@@ -663,7 +663,14 @@ wxString wxFileSystem::FileNameToURL(const wxFileName& filename)
     url.Replace(g_nativePathString, g_unixPathString);
     url.Replace(wxT("%"), wxT("%25")); // '%'s must be replaced first!
     url.Replace(wxT("#"), wxT("%23"));
+#ifndef __WXMSW__
+    // even though encoding the colon is (AFAICS) the right thing to do, we
+    // shouldn't do this under Windows because IE refuses to handle the
+    // resulting file:// URLs and Firefox and Opera (and probably all the other
+    // browsers as they need to be IE-compatible anyhow) open both the versions
+    // with ':' and "%3A", so leave the colon alone to keep IE happy
     url.Replace(wxT(":"), wxT("%3A"));
+#endif // __WXMSW__
     url = wxT("file:") + url;
     return url;
 }