mirror of
https://github.com/Ashinch/ReadYou.git
synced 2025-02-01 11:57:02 +01:00
fix: remove whitespace & line break before opening URLs
This commit is contained in:
parent
0f41e9243d
commit
bddc8766ec
@ -78,7 +78,7 @@ fun Context.openURL(
|
||||
specificBrowser: OpenLinkSpecificBrowserPreference = OpenLinkSpecificBrowserPreference.default
|
||||
) {
|
||||
if (!url.isNullOrBlank()) {
|
||||
val uri = url.toUri()
|
||||
val uri = url.trim { it.isWhitespace() || it == '\n' }.toUri()
|
||||
val intent = Intent(Intent.ACTION_VIEW, uri)
|
||||
val customTabsIntent = CustomTabsIntent.Builder().setShowTitle(true).build()
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user