Greetings!
The question about HMAC got me to revisit my Gist library. And realise it’s been a while since I posted anything there. Well, can’t have that. Here’s my kin_slugify
https://gist.github.com/jolle-c/ed80e4a40e712572fad00f9261c85f58It solves the problem when you for example publish news articles and you want the headline of the article to be used as part of the URL linking to it. Headlines can have vastly more things in them than suits a URL so you’d need a way to clean it up before using it. Hence kin_slugify.
It will take a string of your choice and return a URL safe string.
Like:
Swedish Räksmörgås a treat for /me/?
Would be returned as:
swedish-raksmorgas-a-treat-for-me
This could then be easily served as part of a URL:
www.coolnews.tld/9587FTR4/swedish-raksmorgas-a-treat-for-me
It will also remove all emojis and similar. I can’t however show that in this email since Lasso talk would probably choke on it. (Old problem)
Enjoy
HDB
Jolle
#############################################################
This message is sent to you because you are subscribed to
the mailing list Lasso
[hidden email]
Official list archives available at
http://www.lassotalk.comTo unsubscribe, E-mail to: <
[hidden email]>
Send administrative queries to <
[hidden email]>