From 1540e4f56146a44a74d548c5b018105fe4bdbb44 Mon Sep 17 00:00:00 2001 From: makeworld Date: Mon, 11 Jan 2021 10:06:21 -0500 Subject: [PATCH] 'about:' URLs can now be typed in the bottom bar Fixes #167 --- CHANGELOG.md | 1 + display/display.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0731dfa..a24a009 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Don't use cache when URL is typed in bottom bar (#159) - Fix downloading of pages that are too large or timed out +- `about:` URLs can be typed into the bottom bar (#167) ## [1.7.2] - 2020-12-21 diff --git a/display/display.go b/display/display.go index b3d448a..e6a2a5d 100644 --- a/display/display.go +++ b/display/display.go @@ -200,7 +200,7 @@ func Init(version, commit, builtBy string) { // Detect if it's a search or URL if (strings.Contains(query, " ") && !hasSpaceisURL.MatchString(query)) || (!strings.HasPrefix(query, "//") && !strings.Contains(query, "://") && - !strings.Contains(query, ".")) { + !strings.Contains(query, ".")) && !strings.HasPrefix(query, "about:") { // Has a space and follows regex, OR // doesn't start with "//", contain "://", and doesn't have a dot either. // Then it's a search