jsnmrs / aggro

Aggro is the codebase that powers BMXfeed.com.

Home Page:https://bmxfeed.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve emoji parsing in video titles

jsnmrs opened this issue · comments

Emojis in video titles are causing some issues. It appears that everything after an emoji is being stripped out of title.

https://bmxfeed.com/video/eOnkPH3dQU8 loses it's title altogether. Spotted this via a Lighthouse scan that returned 97 out of 100 for accessibility due to the empty link.
Screenshot of YouTube video title starting with an emoji

Changing the DB charset and collation around (via https://stackoverflow.com/a/20681943) in #395 and doing the same on the production DB, the emojis are replaced with "?" instead of truncating the rest of the title:

Screenshot 2023-01-12 at 9 53 22 PM

This is good enough for now. My primary concern was videos that have empty titles (due to starting with emoji). That appears to be preventable with this configuration change.