Some Special chars in filename cause invalid routing error in panel

Hi.

Problem:

In the panel, I get an invalid routing error when I try to access files that contain special chars like e.g. ! & :. I am not able to access those files or delete them. However, it is possible to access those files without the panel via the direct link.

Can I make files with those special characters work, or do I need to work around this problem?

Background:

For my clients I wrote a PDF generator that automatically puts some page contents into a pdf and names it after the following pattern:

CLIENT NAME - PARENT PAGE - THIS PAGE.pdf

Depending on how the pages are named, special characters like & : ! may occur in my pdf file name with this pattern.

You could use str::slug() to convert these characters when creating the PDF files, or use the page ID instead of the title (this would have the additional advantage of these IDs being unique while the title may not)

Hi,

indeed. ID is not an option because the clients change the title all the time and it’s not reliable that they’re going to do so for the ID as well. I assume slugging is the only option for now. That’s okay, but of course it would have been cooler to have the filename as fancy as the page title.

Thanks

Well, I think there is a reason why this doesn’t work and this is interoperability. While you can use almost any character in most modern operating systems, there are still limitations. For example, you can’t use a nul character or a slash in UNIXy systems.