Properly escape urls passed to wxLaunchDefaultBrowser()

This commit is contained in:
Jon Evans 2018-03-30 22:02:13 -04:00
parent 62fe78f08c
commit e3d9a23867
1 changed files with 3 additions and 1 deletions

View File

@ -35,6 +35,7 @@
#include <wx/mimetype.h> #include <wx/mimetype.h>
#include <wx/tokenzr.h> #include <wx/tokenzr.h>
#include <wx/filename.h> #include <wx/filename.h>
#include <wx/uri.h>
#include <macros.h> #include <macros.h>
@ -106,7 +107,8 @@ bool GetAssociatedDocument( wxWindow* aParent,
{ {
if( aDocName.First( url_header[ii] ) == 0 ) // looks like an internet url if( aDocName.First( url_header[ii] ) == 0 ) // looks like an internet url
{ {
wxLaunchDefaultBrowser( aDocName ); wxURI uri( aDocName );
wxLaunchDefaultBrowser( uri.BuildURI() );
return true; return true;
} }
} }