Skip to content

Commit 5e0b66f

Browse files
committed
Render notes with HTML correctly
1 parent fce841f commit 5e0b66f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

core/addresssearch/src/main/java/com/crisiscleanup/core/addresssearch/GooglePlaceAddressSearchRepository.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ class GooglePlaceAddressSearchRepository @Inject constructor(
5151
private suspend fun placesClient(): PlacesClient {
5252
placesClientMutex.withLock {
5353
if (placesClientInternal == null) {
54-
Places.initialize(context, settingsProvider.mapsApiKey)
54+
Places.initializeWithNewPlacesApiEnabled(
55+
context,
56+
settingsProvider.mapsApiKey,
57+
)
5558
placesClientInternal = Places.createClient(context)
5659
}
5760
}

feature/caseeditor/src/main/java/com/crisiscleanup/feature/caseeditor/ui/NotesFlagsScreen.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ internal fun NoteView(
5454
}
5555
var noteText = note.note
5656
if (noteText.contains('<') &&
57-
noteText.contains('>')
57+
noteText.contains('>') ||
58+
noteText.contains("&#")
5859
) {
5960
noteText = HtmlCompat.fromHtml(noteText, HtmlCompat.FROM_HTML_MODE_COMPACT).toString()
6061
}

0 commit comments

Comments
 (0)