Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ import org.osmdroid.views.overlay.TilesOverlay
import timber.log.Timber
import javax.inject.Inject
import javax.inject.Named
import androidx.core.text.HtmlCompat



class ExploreMapFragment : CommonsDaggerSupportFragment(), ExploreMapContract.View,
LocationUpdateListener, LocationPermissionCallback {
Expand Down Expand Up @@ -675,8 +678,12 @@ class ExploreMapFragment : CommonsDaggerSupportFragment(), ExploreMapContract.Vi
descriptionText
else
descriptionText.replaceFirst(".$".toRegex(), ""))
// Set the short description after we remove place name from long description
binding!!.bottomSheetDetailsBinding.description.text = descriptionText
val cleanedDescription = descriptionText
// Remove MediaWiki UI images/icons
.replace(Regex("<img[^>]*>"), "")

// Set the short description after we remove place name from long description and we render the HTML tags
binding!!.bottomSheetDetailsBinding.description.text = HtmlCompat.fromHtml(cleanedDescription, HtmlCompat.FROM_HTML_MODE_LEGACY)
}

override fun addSearchThisAreaButtonAction() {
Expand Down