HermanMartinus / bearblog

Free, no-nonsense, super fast blogging.
MIT License
2.37k stars 73 forks source link

Title with all characters in CJK generates inaccessible link #197

Closed NightFeather closed 1 year ago

NightFeather commented 1 year ago

I've stumbled upon some pages in discovery and also tried publishing one myself. I found that if I use only CJK characters in title field, it will generates a empty link, which makes the page inaccessible from public side.

Manual specify a link would solve this, but maybe it should warn user that auto-generated link is empty ?

HermanMartinus commented 1 year ago

It looks like the slugification of the title doesn't support those characters. I'll look into some solutions for this, but in the meantime you will have to specify the link yourself.

HermanMartinus commented 1 year ago

If the link is bad it is auto-generated as a 10 character string. This worked better than encoding as both are unreadable but the auto-generated link is shorter and easier to work with.