X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FHelper%2FEntriesExport.php;h=e91007e1ba7eeccb6781e601a770ebfcb182bd5d;hb=45d94a98f78320fd993c4d5bce925c66d8e38346;hp=0cf835b48be00ee1a35566f461fd570f47e2e37e;hpb=a707643ef1a0d5f1cf4ab9826492f4c9cb2d8c09;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Helper/EntriesExport.php b/src/Wallabag/CoreBundle/Helper/EntriesExport.php index 0cf835b4..e91007e1 100644 --- a/src/Wallabag/CoreBundle/Helper/EntriesExport.php +++ b/src/Wallabag/CoreBundle/Helper/EntriesExport.php @@ -163,8 +163,12 @@ class EntriesExport $book->setSubject($tag['value']); } + // the reader in Kobo Devices doesn't likes special caracters + // in filenames, we limit to A-z/0-9 + $filename = preg_replace('/[^A-Za-z0-9\-]/', '', $entry->getTitle()); + $chapter = $content_start.$entry->getContent().$bookEnd; - $book->addChapter($entry->getTitle(), htmlspecialchars($entry->getTitle()).'.html', $chapter, true, EPub::EXTERNAL_REF_ADD); + $book->addChapter($entry->getTitle(), htmlspecialchars($filename).'.html', $chapter, true, EPub::EXTERNAL_REF_ADD); } return Response::create(