aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Helper/EntriesExport.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Helper/EntriesExport.php')
-rw-r--r--src/Wallabag/CoreBundle/Helper/EntriesExport.php6
1 files changed, 5 insertions, 1 deletions
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
163 $book->setSubject($tag['value']); 163 $book->setSubject($tag['value']);
164 } 164 }
165 165
166 // the reader in Kobo Devices doesn't likes special caracters
167 // in filenames, we limit to A-z/0-9
168 $filename = preg_replace('/[^A-Za-z0-9\-]/', '', $entry->getTitle());
169
166 $chapter = $content_start.$entry->getContent().$bookEnd; 170 $chapter = $content_start.$entry->getContent().$bookEnd;
167 $book->addChapter($entry->getTitle(), htmlspecialchars($entry->getTitle()).'.html', $chapter, true, EPub::EXTERNAL_REF_ADD); 171 $book->addChapter($entry->getTitle(), htmlspecialchars($filename).'.html', $chapter, true, EPub::EXTERNAL_REF_ADD);
168 } 172 }
169 173
170 return Response::create( 174 return Response::create(