codebuddies / backend

CodeBuddies back-end
https://codebuddies.org
GNU General Public License v3.0
20 stars 25 forks source link

[Tagging] Slug-ification of Emoji & ASCII Images Results in Useless/Unidentifiable String #124

Closed BethanyG closed 4 years ago

BethanyG commented 4 years ago

While emoji can be successfully saved to postgreSQL, they cannot be successfully or safely passed through Djangos slugify() code - while emoji can be used as part of a URL see this obnoxious example...it is still frowned upon, and Djangos code doesn't tolerate it.

If a tag is entered that contains only emoji, Django assigns either blank space, or an underscore plus a number to represent the "slug" of the string of characters:

image

Emoji inside a string is simply dropped:

image

Similar problems arise with ASCII image characters:

image

Because of this, we need to put validation code around tags, and fail tag strings that include emoji or other ASCII / Unicode "image" characters.

@lpatmo - we definitely need to do this for the backend, and probably should also do this around form/entry validation on the front end.

lpatmo commented 4 years ago

@lpatmo - we definitely need to do this for the backend, and probably should also do this around form/entry validation on the front end.

Yep! 🙌Thanks for porting all these comments over! :)

BethanyG commented 4 years ago

Ooops. Sorry @lpatmo! I just..removed them in favor of issue #127...but can put them back if needed....

lpatmo commented 4 years ago

Haha, no worries. This makes the acceptance criteria in this issue clean/easier to read!