Loops handles mentions and hashtags in captions differently than mastodon + pixelfed, but better.
Instead of returning html, we simply use plaintext and provide a map of mentions/hashtags/links with indices so you can properly autolink them in your client.
Twitter pioneered this method, and it works great, especially on mobile when you want to capture these types of links to handle better.