Skip to content

Commit cd337b0

Browse files
Fixed Blue square appears at end of description of image uploaded (commons-app#5616)
* Fixed Grey empty screen at Upload wizard caption step after denying files permission * Empty commit * Fixed loop issue * Created docs for earlier commits * Fixed javadoc * Fixed spaces * Added added basic features to OSM Maps * Added search ___location feature * Added filter to Open Street Maps * Fixed chipGroup in Open Street Maps * Removed mapBox code * Removed mapBox's code * Reformat code * Reformatted code * Removed rotation feature to map * Removed rotation files and Fixed Marker click problem * Ignored failing tests * Added voice input feature * Fixed test cases * Changed caption and description text * Replaced mapbox to osmdroid in upload activity * Fixed Unit Tests * Made selected marker to be fixed on map * Changed color of map marker * Fixes commons-app#4345 * Delete app/src/main/res/values-yue-hant directory * Added comment explaining the context --------- Co-authored-by: Nicolas Raoul <[email protected]>
1 parent 724e4db commit cd337b0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/src/main/java/fr/free/nrw/commons/media/MediaDetailFragment.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1300,7 +1300,12 @@ private String prettyCaption(Media media) {
13001300
}
13011301

13021302
private String prettyDescription(Media media) {
1303-
final String description = chooseDescription(media);
1303+
String description = chooseDescription(media);
1304+
if (!description.isEmpty()) {
1305+
// Remove img tag that sometimes appears as a blue square in the app,
1306+
// see https://github.com/commons-app/apps-android-commons/issues/4345
1307+
description = description.replaceAll("[<](/)?img[^>]*[>]", "");
1308+
}
13041309
return description.isEmpty() ? getString(R.string.detail_description_empty)
13051310
: description;
13061311
}

0 commit comments

Comments
 (0)