don't encode collons in file:// URLs under Windows as IE is incapable of opening them (and other browsers can open both forms) (patch 1890922)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51904 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -130,7 +130,8 @@ wxMSW:
|
||||
|
||||
- Fix rare bug with messages delivered to wrong wxSocket (Tim Kosse).
|
||||
- Fix setting icons when they have non-default (16*16 and 32*32) sizes.
|
||||
- Fixed wxLocale::GetInfo to use the C locale.
|
||||
- Fixed wxLocale::GetInfo() to use the CRT locale.
|
||||
- Return URLs which IE can open from wxFileSystem::FileNameToURL().
|
||||
- Don't enable disabled windows when showing them (Harry McKame).
|
||||
- Fix assert when using owner-drawn menu items with the newest (Vista) SDK.
|
||||
- Fixed wxTextCtrl to not process clipboard events twice if there's
|
||||
|
@@ -641,7 +641,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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user