customisation-db
customisation-db copied to clipboard
Fix bug where emojis in contrib title cause SQL error
Interesting bug that a few people have noticed @LukeWCS @Crizz0 @vinny @danieltj27 - in Titania, if you're on Windows or Android, and use an emoji like 🆕 in the new contrib name it would spit out an SQL error like Incorrect string value: '\xF0\x9F\x86\x95\x0AS...'
when trying to submit. It's hard to reproduce because it seems to be fine on Mac.
My findings were that due to some code deep in Titania, unlike the other fields the actual contrib message/description seemed to be immune from this because it was being parsed to XML with the s9e text formatting library.
I've followed that lead to import s9e and parse/unparse the contrib names.
- [x] Fix contrib name using emojis on edit
- [ ] Check emojis in original submission (create)
- See /controller/author.php:421
- [ ] Might need to parse/unparse other fields too (see #389)
- [ ] Unparse title on add revision page