From fe0de26277f66ef8c0abadf4ef5a01df4448a11c Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 10 May 2020 11:13:36 +0200 Subject: LibWeb+Browser: Support about: URL protocol so "about:blank" works :^) For now, we simply load an empty resource from any about: URL. --- Applications/Browser/Tab.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Applications/Browser') diff --git a/Applications/Browser/Tab.cpp b/Applications/Browser/Tab.cpp index c0653feccc..4ce198a216 100644 --- a/Applications/Browser/Tab.cpp +++ b/Applications/Browser/Tab.cpp @@ -100,7 +100,7 @@ Tab::Tab() m_location_box->on_return_pressed = [this] { String location = m_location_box->text(); - if (!location.starts_with("file://") && !location.starts_with("http://") && !location.starts_with("https://")) { + if (!URL(location).is_valid()) { StringBuilder builder; builder.append("http://"); builder.append(location); -- cgit v1.2.3