Grandt / PHPePub

PHP Classes for dynamically generating EPub files.
http://www.phpclasses.org/package/6115
241 stars 83 forks source link

Encoding special caracters for filename #24

Open tcitworld opened 10 years ago

tcitworld commented 10 years ago

Let's say I want to create an ebook with the title containing a |, like « some text | some text », and a chapter with the same name. The table of contents is linking to my chapter as some text | some text.html, but the html file created (corresponding to the chapter) is named some text _ some text.html. So I can't access my first chapter.

I'm currently putting PHPePub into wallabag, and without this issue, it works great.

tcitworld commented 10 years ago

Okay, here's what I've edited (and seems not so bad) :

What I got : All spaces are converted into dashes - and my special character is gone, so I've got something like some-text-some-text.html.

Oh, and I've just realised I've got another example : I've got a chapter named some/text and before my modification it created a folder named some with a text.html file. Now I just a sometext.html file.

So it's not perfect, but at least it's working for me. Any ideas ?

tcitworld commented 9 years ago

Any news ?