From f8f93a9cab19f538961b160bea885fee71e3d45e Mon Sep 17 00:00:00 2001 From: Tobias Taschner Date: Thu, 22 Feb 2018 10:09:26 +0100 Subject: [PATCH] Enable usage of SetPage() with empty URL --- src/common/webview_chromium.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index a29ad67306..61853ac9f2 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -597,8 +597,13 @@ void wxWebViewChromium::SetEditable(bool enable) void wxWebViewChromium::DoSetPage(const wxString& html, const wxString& baseUrl) { + wxString pageBaseUrl = baseUrl; + // CEF needs a baseURL that is not empty, set one if not specified + if(pageBaseUrl.empty()) + pageBaseUrl = "file://"; + m_clientHandler->GetBrowser()->GetMainFrame()->LoadString(html.ToStdString(), - baseUrl.ToStdString()); + pageBaseUrl.ToStdString()); } wxWebViewZoom wxWebViewChromium::GetZoom() const