Fix invalid UTF-8 trimming in "recent collections"
(cherry picked from commit 8766f7254d845a20453df47dcca09a744be3c114)