Clean up badge escaping