diff options
author | tcit <tcit@tcit.fr> | 2014-04-24 03:08:31 +0200 |
---|---|---|
committer | tcit <tcit@tcit.fr> | 2014-04-24 03:08:31 +0200 |
commit | 72a857158c187206dae2eed08143d5743322cb0c (patch) | |
tree | b2cb430a986929a76f50cd53a3e8b79474d9d0f7 /inc | |
parent | 87090d8ae7582708d20f3c09fb37d780af860bcd (diff) | |
download | wallabag-72a857158c187206dae2eed08143d5743322cb0c.tar.gz wallabag-72a857158c187206dae2eed08143d5743322cb0c.tar.zst wallabag-72a857158c187206dae2eed08143d5743322cb0c.zip |
Fixed a bug into PHPePub with special caracters
Diffstat (limited to 'inc')
-rw-r--r-- | inc/3rdparty/libraries/PHPePub/EPub.php | 3 |
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("      ", $level) . "<a href=\"" . $fileName . "\">" . $chapterName . "</a></p>\n"; | 1703 | $tocData .= "\t<p>" . str_repeat("      ", $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)) { |