From 2d271763336abbb2cb95119ddeb837712ac96b1f Mon Sep 17 00:00:00 2001 From: Tuomas Airaksinen Date: Thu, 28 Nov 2024 19:27:43 +0200 Subject: [PATCH] Fix #3325 (Link that was created by AndBible caused crash) --- app/src/main/java/net/bible/service/common/CommonUtils.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/net/bible/service/common/CommonUtils.kt b/app/src/main/java/net/bible/service/common/CommonUtils.kt index 4f2cfa4085..e8afce72d7 100644 --- a/app/src/main/java/net/bible/service/common/CommonUtils.kt +++ b/app/src/main/java/net/bible/service/common/CommonUtils.kt @@ -1663,7 +1663,10 @@ object CommonUtils : CommonUtilsBase() { val v11n = if (v11nStr == null) defV11n else Versifications.instance().getVersification(v11nStr) ?: defV11n val match = urlRegex.find(uri.path.toString()) ?: return null - val keyStr = match.groups[1]?.value ?: return null + var keyStr = match.groups[1]?.value ?: return null + if (keyStr.contains(":")) { + keyStr = keyStr.split(":", limit = 2)[1] + } val key: Passage = PassageKeyFactory.instance().getKey(v11n, keyStr)