diff --git a/Userland/Applications/Browser/BrowserWindow.cpp b/Userland/Applications/Browser/BrowserWindow.cpp index 3eb8344378..c435293ec4 100644 --- a/Userland/Applications/Browser/BrowserWindow.cpp +++ b/Userland/Applications/Browser/BrowserWindow.cpp @@ -102,7 +102,7 @@ BrowserWindow::BrowserWindow(CookieJar& cookie_jar, URL url) }; m_window_actions.on_create_new_tab = [this] { - create_new_tab(Browser::g_home_url, true); + create_new_tab(Browser::url_from_user_input(Browser::g_home_url), true); }; m_window_actions.on_next_tab = [this] { @@ -171,7 +171,7 @@ void BrowserWindow::build_menus() m_go_back_action = GUI::CommonActions::make_go_back_action([this](auto&) { active_tab().go_back(); }, this); m_go_forward_action = GUI::CommonActions::make_go_forward_action([this](auto&) { active_tab().go_forward(); }, this); - m_go_home_action = GUI::CommonActions::make_go_home_action([this](auto&) { active_tab().load(g_home_url); }, this); + m_go_home_action = GUI::CommonActions::make_go_home_action([this](auto&) { active_tab().load(Browser::url_from_user_input(g_home_url)); }, this); m_go_home_action->set_status_tip("Go to home page"); m_reload_action = GUI::CommonActions::make_reload_action([this](auto&) { active_tab().reload(); }, this); m_reload_action->set_status_tip("Reload current page"); diff --git a/Userland/Applications/Browser/main.cpp b/Userland/Applications/Browser/main.cpp index 4380261e95..218fc5a59e 100644 --- a/Userland/Applications/Browser/main.cpp +++ b/Userland/Applications/Browser/main.cpp @@ -92,7 +92,7 @@ ErrorOr serenity_main(Main::Arguments arguments) TRY(load_content_filters()); - URL first_url = Browser::g_home_url; + URL first_url = Browser::url_from_user_input(Browser::g_home_url); if (specified_url) { if (Core::File::exists(specified_url)) { first_url = URL::create_with_file_protocol(Core::File::real_path_for(specified_url));