Skip to content

Commit

Permalink
fix: a minor enhancement for parsing url.
Browse files Browse the repository at this point in the history
  • Loading branch information
plateaukao committed Jun 6, 2024
1 parent 6e1fdb8 commit c1ef08b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/info/plateaukao/einkbro/unit/BrowserUnit.kt
Original file line number Diff line number Diff line change
Expand Up @@ -294,14 +294,14 @@ object BrowserUnit : KoinComponent {
}
}

if (isURL(query) && !query.contains(" ")) {
if (isURL(query)) {
if (query.startsWith(URL_SCHEME_ABOUT) || query.startsWith(URL_SCHEME_MAIL_TO)) {
return query
}
if (!query.contains("://")) {
query = URL_SCHEME_HTTPS + query
}
return query
return query.replace(" ", "+")
}

try {
Expand Down

0 comments on commit c1ef08b

Please sign in to comment.