4 ms·
What is a "normalized slug"?
by dfc 9y ago
What is a "normalized slug"?
- nerdponx 9y agoAll names get reduced using Unicode normalization.
- rspeer 9y agoRecently, thousands of users were duped into installing "АdВIосk РIuѕ" in Chrome. Every one of those letters is Unicode normalized. (Hint: it's not just the I's masquerading as l's.)
- nerdponx 9y agoFair enough. I'm a little surprised that those hold up under NFK normalization. А sure as heck seems compatible with A.
- Arnt 9y agoThe kind of excerpt-like thing you see on the end of many many modern URLs. "rare-white-moose-captured-on-film-in-sweden" in this one: www.bbc.com/news/av/world-europe-40918494/rare-white-moose-captured-on-film-in-sweden It's machine-produced and surprisingly good at revealing accidental/unintentional/evil duplicates, considering how cheap it is.
- 27182818284 9y agoslug is a term leftover from newspapers. You most commonly see slugs today where a title might be "Did you know this mushroom is off the hook?" and the URL is turned in to a "slug" like example.com/mushroom-off-the-hook/ Here is an example of the Django framework's "slugify" https://github.com/django/django/blob/master/django/utils/text.py#L403 https://github.com/django/django/blob/master/django/utils/te...
- manigandham 9y agoA simpler representation of some text, using only lowercase letters, numbers and dashes for spaces. Removes any unsafe or "invisible" characters, accents, and sometimes simple words. Often used in URLs. TEXT: Fake WhatsApp update from “WhatsApp Inc.” with Unicode whitespace: 1M downloads SLUG: fake-whatsapp-update-from-whatsapp-inc-with-unicode-whitespace-1m-downloads