Fix Nearby description showing raw HTML tags #6595
Open
+6
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description (required)
Fixes #6594
The description text shown in the Nearby map bottom sheet previously displayed raw HTML tags such as
<br>and<b>, instead of rendering formatting. This reduced readability and made the UI appear visually broken.This PR updates the description binding in
ExploreMapFragment.passInfoToSheet()to use:HtmlCompat.fromHtml(descriptionText, HtmlCompat.FROM_HTML_MODE_LEGACY)
This allows HTML to be rendered as styled text (e.g., bold and line breaks), matching the formatting already used in the Details screen.
Tests performed (required)
Tested on:
Build variant: betaDebug
Device: Samsung Galaxy S23
Android version: Android 16 (API level 35)
Steps:
Opened Explore → Map
Selected a nearby marker and tapped the bottom info banner
Verified that HTML is properly rendered:
<b>→ bold text<br>→ correct line breakNo visible raw HTML tags
Uploaded a test image to Beta Commons to ensure environment functionality
Test upload URL:
https://commons.wikimedia.beta.wmflabs.org/wiki/File%3ATest_html_tags.jpg
Screenshots (for UI changes only)