Fixed Blue square appears at end of description of image uploaded (#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 #4345

* Delete app/src/main/res/values-yue-hant directory

* Added comment explaining the context

---------

Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
This commit is contained in:
Kanahia 2024-03-25 04:59:30 +05:30 committed by GitHub
parent 724e4db0fd
commit cd337b000e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1300,7 +1300,12 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment implements
}
private String prettyDescription(Media media) {
final String description = chooseDescription(media);
String description = chooseDescription(media);
if (!description.isEmpty()) {
// Remove img tag that sometimes appears as a blue square in the app,
// see https://github.com/commons-app/apps-android-commons/issues/4345
description = description.replaceAll("[<](/)?img[^>]*[>]", "");
}
return description.isEmpty() ? getString(R.string.detail_description_empty)
: description;
}