'about:' URLs can now be typed in the bottom bar

Fixes #167
This commit is contained in:
makeworld 2021-01-11 10:06:21 -05:00
parent 7db8a8a819
commit 1540e4f561
2 changed files with 2 additions and 1 deletions

View File

@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
- Don't use cache when URL is typed in bottom bar (#159) - Don't use cache when URL is typed in bottom bar (#159)
- Fix downloading of pages that are too large or timed out - 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 ## [1.7.2] - 2020-12-21

View File

@ -200,7 +200,7 @@ func Init(version, commit, builtBy string) {
// Detect if it's a search or URL // Detect if it's a search or URL
if (strings.Contains(query, " ") && !hasSpaceisURL.MatchString(query)) || if (strings.Contains(query, " ") && !hasSpaceisURL.MatchString(query)) ||
(!strings.HasPrefix(query, "//") && !strings.Contains(query, "://") && (!strings.HasPrefix(query, "//") && !strings.Contains(query, "://") &&
!strings.Contains(query, ".")) { !strings.Contains(query, ".")) && !strings.HasPrefix(query, "about:") {
// Has a space and follows regex, OR // Has a space and follows regex, OR
// doesn't start with "//", contain "://", and doesn't have a dot either. // doesn't start with "//", contain "://", and doesn't have a dot either.
// Then it's a search // Then it's a search