Fix crash when opening a URL with associated text (#699)

* Fix crash when opening a URL with associated text

* Enforce using an `Activity` instead of a `Context` in `SafeUriHandler`.
This commit is contained in:
Jorge Martin Espinosa 2023-06-28 11:19:39 +02:00 committed by GitHub
parent 683b0b3594
commit b66801a022
5 changed files with 45 additions and 1 deletions

View file

@ -535,7 +535,7 @@ private fun AnnotatedString.Builder.appendLink(link: Element) {
val permalinkData = PermalinkParser.parse(uriString)
when (permalinkData) {
is PermalinkData.FallbackLink -> {
pushStringAnnotation(tag = "URL", annotation = link.ownText())
pushStringAnnotation(tag = "URL", annotation = permalinkData.uri.toString())
withStyle(
style = SpanStyle(color = LinkColor)
) {