aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/3rdparty/libraries/PHPePub/EPub.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/3rdparty/libraries/PHPePub/EPub.php')
-rw-r--r--inc/3rdparty/libraries/PHPePub/EPub.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/inc/3rdparty/libraries/PHPePub/EPub.php b/inc/3rdparty/libraries/PHPePub/EPub.php
index 836c0512..0260ce4f 100644
--- a/inc/3rdparty/libraries/PHPePub/EPub.php
+++ b/inc/3rdparty/libraries/PHPePub/EPub.php
@@ -343,6 +343,7 @@ class EPub {
343 } 343 }
344 $fileName = Zip::getRelativePath($fileName); 344 $fileName = Zip::getRelativePath($fileName);
345 $fileName = preg_replace('#^[/\.]+#i', "", $fileName); 345 $fileName = preg_replace('#^[/\.]+#i', "", $fileName);
346 $fileName = $this->sanitizeFileName($fileName);
346 347
347 $chapter = $chapterData; 348 $chapter = $chapterData;
348 if ($autoSplit && is_string($chapterData) && mb_strlen($chapterData) > $this->splitDefaultSize) { 349 if ($autoSplit && is_string($chapterData) && mb_strlen($chapterData) > $this->splitDefaultSize) {
@@ -1699,7 +1700,7 @@ class EPub {
1699 while (list($chapterName, $navPoint) = each($this->ncx->chapterList)) { 1700 while (list($chapterName, $navPoint) = each($this->ncx->chapterList)) {
1700 $fileName = $navPoint->getContentSrc(); 1701 $fileName = $navPoint->getContentSrc();
1701 $level = $navPoint->getLevel() -2; 1702 $level = $navPoint->getLevel() -2;
1702 $tocData .= "\t<p>" . str_repeat(" &#160; &#160; &#160;", $level) . "<a href=\"" . $fileName . "\">" . $chapterName . "</a></p>\n"; 1703 $tocData .= "\t<p>" . str_repeat(" &#160; &#160; &#160;", $level) . "<a href=\"" . $this->sanitizeFileName($fileName) . "\">" . $chapterName . "</a></p>\n";
1703 } 1704 }
1704 } else if ($this->tocAddReferences === TRUE) { 1705 } else if ($this->tocAddReferences === TRUE) {
1705 if (array_key_exists($item, $this->ncx->referencesList)) { 1706 if (array_key_exists($item, $this->ncx->referencesList)) {