URLs are not functioning properly when there are non-latin characters in book/chapter/page names #2806

Closed
opened 2026-02-05 05:15:39 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @apsonandtesla on GitHub (May 20, 2022).

Describe the Bug

I understand that Bookstack uses slug of book, chapter or page as a part of the URL. From product design prospective I guess this is to let the URLs make sense to viewers. But when you have non-latin characters in either book, chapter, or page name, that character is ignored in the URL, and the URLs won't mean anything to viewers in this case.

Steps to Reproduce

  1. Create a Book, or a Chapter, or a Page with a non-latin name, for example "我是猫" (which is in Simplified Chinese and it means "I‘m a cat")
  2. You can see that the URL doesn't really makes any sense

Expected Behaviour

I think the URL should encode the non-latin characters instead, and in many browsers those characters can be decoded once again and people can literally read the URL, even they are non-latin.

Screenshots or Additional Context

No response

Browser Details

No response

Exact BookStack Version

v22.04.1

PHP Version

No response

Hosting Environment

Docker Compose via Portainer, on CentOS 7

Originally created by @apsonandtesla on GitHub (May 20, 2022). ### Describe the Bug I understand that Bookstack uses slug of book, chapter or page as a part of the URL. From product design prospective I guess this is to let the URLs make sense to viewers. But when you have non-latin characters in either book, chapter, or page name, that character is ignored in the URL, and the URLs won't mean anything to viewers in this case. ### Steps to Reproduce 1. Create a Book, or a Chapter, or a Page with a non-latin name, for example "我是猫" (which is in Simplified Chinese and it means "I‘m a cat") 2. You can see that the URL doesn't really makes any sense ### Expected Behaviour I think the URL should encode the non-latin characters instead, and in many browsers those characters can be decoded once again and people can literally read the URL, even they are non-latin. ### Screenshots or Additional Context _No response_ ### Browser Details _No response_ ### Exact BookStack Version v22.04.1 ### PHP Version _No response_ ### Hosting Environment Docker Compose via Portainer, on CentOS 7
OVERLORD added the 🐛 Bug label 2026-02-05 05:15:39 +03:00
Author
Owner

@ssddanbrown commented on GitHub (May 21, 2022):

Thanks for reporting @apsonandtesla, but this is known handling and I think really an opinion rather than a bug in the system. The currently functionality is used to provide a cleaner URL when used externally, rather than a longer URL full for loads of non-user-understandable encoding characters. As you say, the browser will often show these decoded in the URL bar but in most of these cases the user will be looking at the page hence does not need the added context.

@ssddanbrown commented on GitHub (May 21, 2022): Thanks for reporting @apsonandtesla, but this is known handling and I think really an opinion rather than a bug in the system. The currently functionality is used to provide a cleaner URL when used externally, rather than a longer URL full for loads of non-user-understandable encoding characters. As you say, the browser will often show these decoded in the URL bar but in most of these cases the user will be looking at the page hence does not need the added context.
Author
Owner

@apsonandtesla commented on GitHub (May 21, 2022):

@ssddanbrown While I understand your idea, but for non-latin language users, currently the URL is still meaningless, and to be honest this is not entirely uncommon, so as a non-latin language user, we are more commonly using things like a tags and write what we want to let content consumers know what the link is.
As a matter of fact, another issue I have after using Bookstack for couple days is also related to the external links. I think it would be better to provide a third option other than the "title link" and the "generated permalink", which is basically a natural "id link" for a page, a chapter, or a book. This "id" should be unique and it should never be reused, and the URL should be 404 if the page is deleted. This would be really helpful, at the very least to non-latin language users, as at the very least we can have a stable URL.

@apsonandtesla commented on GitHub (May 21, 2022): @ssddanbrown While I understand your idea, but for non-latin language users, currently the URL is still meaningless, and to be honest this is not entirely uncommon, so as a non-latin language user, we are more commonly using things like a tags and write what we want to let content consumers know what the link is. As a matter of fact, another issue I have after using Bookstack for couple days is also related to the external links. I think it would be better to provide a third option other than the "title link" and the "generated permalink", which is basically a natural "id link" for a page, a chapter, or a book. This "id" should be unique and it should never be reused, and the URL should be 404 if the page is deleted. This would be really helpful, at the very least to non-latin language users, as at the very least we can have a stable URL.
Author
Owner

@ssddanbrown commented on GitHub (May 30, 2022):

Okay. Since this is not a bug though, and since this is based upon opinion, I'm going to close this off.
I won't be looking to add a new optional URL scheme, but I am looking to change the default scheme to to address issues raised over the years. At some-point soon I'll be opening an issue to request feedback on a new URL scheme so watch out for that.

@ssddanbrown commented on GitHub (May 30, 2022): Okay. Since this is not a bug though, and since this is based upon opinion, I'm going to close this off. I won't be looking to add a new optional URL scheme, but I am looking to change the default scheme to to address issues raised over the years. At some-point soon I'll be opening an issue to request feedback on a new URL scheme so watch out for that.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2806