aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorÉtienne Gilli <etienne.gilli@gmail.com>2016-09-18 14:43:54 +0200
committerÉtienne Gilli <etienne.gilli@gmail.com>2016-09-18 14:43:54 +0200
commit45d94a98f78320fd993c4d5bce925c66d8e38346 (patch)
tree3c055535db881690e47541c2f8f04b6d2865c5ff
parenta707643ef1a0d5f1cf4ab9826492f4c9cb2d8c09 (diff)
downloadwallabag-45d94a98f78320fd993c4d5bce925c66d8e38346.tar.gz
wallabag-45d94a98f78320fd993c4d5bce925c66d8e38346.tar.zst
wallabag-45d94a98f78320fd993c4d5bce925c66d8e38346.zip
Fix issue #2296: epub export with `+` in the title.
-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(