mirror of
https://github.com/wallabag/wallabag.git
synced 2025-05-06 00:24:42 +00:00
fix for special caracters in .mobi filenames
This commit is contained in:
parent
42ac69337f
commit
3829c54bc5
1 changed files with 2 additions and 2 deletions
|
@ -202,8 +202,8 @@ class WallabagMobi extends WallabagEBooks
|
|||
}
|
||||
$mobi->setContentProvider($content);
|
||||
|
||||
// we strip spaces because the browser inside Kindle Devices doesn't likes spaces
|
||||
$this->bookFileName = str_replace(' ', '_', $this->bookFileName);
|
||||
// the browser inside Kindle Devices doesn't likes special caracters either, we limit to A-z/0-9
|
||||
$this->bookFileName = preg_replace('/[^A-Za-z0-9\-]/', '', $this->bookFileName);
|
||||
|
||||
// we offer file to download
|
||||
$mobi->download($this->bookFileName.'.mobi');
|
||||
|
|
Loading…
Reference in a new issue