Skip to content

Commit

Permalink
Fix #3325 (Link that was created by AndBible caused crash)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuomas2 committed Nov 28, 2024
1 parent 1a359ab commit 2d27176
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/src/main/java/net/bible/service/common/CommonUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 2d27176

Please sign in to comment.