trimming urls as well

This commit is contained in:
Vitor Pamplona 2023-05-27 16:16:52 -04:00
parent 1146b8ad54
commit 4517ca9fdd

View File

@ -540,11 +540,11 @@ private fun RelayBadges(baseNote: Note) {
fun RenderRelay(dirtyUrl: String) {
val uri = LocalUriHandler.current
val website = remember(dirtyUrl) {
val cleanUrl = dirtyUrl.removePrefix("wss://").removePrefix("ws://").removeSuffix("/")
val cleanUrl = dirtyUrl.trim().removePrefix("wss://").removePrefix("ws://").removeSuffix("/")
"https://$cleanUrl"
}
val iconUrl = remember(dirtyUrl) {
val cleanUrl = dirtyUrl.removePrefix("wss://").removePrefix("ws://").removeSuffix("/")
val cleanUrl = dirtyUrl.trim().removePrefix("wss://").removePrefix("ws://").removeSuffix("/")
"https://$cleanUrl/favicon.ico"
}