trim badgeText