Strip emojis from reportbacks #7014
Comments
we might want to hold off on this, and wait till we are sending rbs to rogue. |
@angaither with the hope that rogue will accept the emojis? if so, would that mean that ppl could send in emojis?!?! cc @hbghidey |
@ngjo not the hope that rogue will accept emojis, the DEMAND that it does ;) |
😂😂😂😂😂😂😂😂😂😂😂 i would say there must be a good gif for this, but im too busy lol'ing about that. YESSSSSS!!!! DEMANDS!!!! Thanks @angaither ! |
@angaither know that Katie just worked on this for Rogue, but since it won't be turned on for at least some time, would it be possible to add this text in for the interim? We've been getting a lot more RBs as everyone ramps up efforts to get ppl reportingback more, buttttt that has meant more people getting the 404 experience. Let me know! |
@ngjo sure we can put this into the next sprint |
woohoo @angaither thanks! |
@ngjo @angaither Adding in a "don't use emoji" help text seems a bit hostile... would it make more sense to strip out the emoji in a form alter hook so they don't cause the database error? iconv('UTF-8', 'ASCII//IGNORE//TRANSLIT', 'emoji 😅'); // "emoji " |
@DFurnes hahaha, I guess that is a little aggressive! If we go the route you suggested, would the RB show up to be reviewable by the admin? |
That will strip the emojis (and any other non-ASCII characters) from the string, so if we added that as a form alter hook Drupal would never attempt to save them to the database and cause things to blow up. That should mean the reportback would then be reviewable by the admin. Sidnote: Ideally the |
Cool -- thanks for the clarification @DFurnes ! I'll let @angaither decide on this one as I know that Rogue will be able to accept emojis...so whatever's teh easiest! If we got hte route of additional text, I can sync w/ Ben to maybe have something less aggressive sounding. |
Hah sorry, "aggressive" was probably aggressive terminology on my part! 😉 I just feel like we should try to work around any backend quirks if we can, rather than foisting that onto users. Definitely no need to rephrase if we decide to continue with this solution. |
@DFurnes yeah the ultimate goal here is to just allow reportbacks to have emoji in rogue |
Had some problems getting this running, looking at the notes from the community I'm gonna try use to some regex functions I found on SO instead, temp solution right? 😅 |
#7115 doesn't seem to be stripping emoji when posting to the cc @mirie |
@aaronschachter I'm guessing some new emoji;s have been added to the ecosystem since we merged this PR. Thanks for hot-fixing it on your end |
FYI - Mobile Commons just released emoji support last week, so Gambit historically was never sending raw emoji until recently. Before the emoji release, Mobile Commons stripped them on their end when posting to Gambit. |
FEATURE OVERVIEW
User Story
As a member, I should know that I can't submit an emoji in the RB caption or Why cuz it'll 404.
Additional Information (optional)
If you submit an emoji it will break the campaign page -- we're getting zendesk tickets from people who are saying after they try to submit a RB, the page 404s and we think it could be someone submitting emojis.
Easier (and interim) fix to #6167 !
Why This Matters
So the site doesn't break and the user knows that they can't put in an emoji.
Here's the text to add in the two places:
cc @hbghidey
The text was updated successfully, but these errors were encountered: