Fix loading of URL without scheme (fixes issue #3079)
This commit is contained in:
parent
5ef0fb8ac8
commit
59c11404e6
|
@ -350,6 +350,13 @@ void CefFrameHostImpl::LoadURLWithExtras(const std::string& url,
|
|||
// Any necessary fixup of the URL will occur in
|
||||
// [CefBrowserHostBase|CefFrameHostImpl]::Navigate().
|
||||
GURL gurl(url);
|
||||
if (!url.empty() && !gurl.is_valid() && !gurl.has_scheme()) {
|
||||
std::string fixed_scheme(url::kHttpScheme);
|
||||
fixed_scheme.append(url::kStandardSchemeSeparator);
|
||||
std::string new_url = url;
|
||||
new_url.insert(0, fixed_scheme);
|
||||
gurl = GURL(new_url);
|
||||
}
|
||||
|
||||
if (frame_id == CefFrameHostImpl::kMainFrameId) {
|
||||
// Load via the browser using NavigationController.
|
||||
|
|
Loading…
Reference in New Issue