1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 11:35:06 +00:00

LibWeb+Browser: Support about: URL protocol so "about:blank" works :^)

For now, we simply load an empty resource from any about: URL.
This commit is contained in:
Andreas Kling 2020-05-10 11:13:36 +02:00
parent 56dbe58bbb
commit fe0de26277
3 changed files with 10 additions and 2 deletions

View file

@ -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);