mirror of
https://github.com/moparisthebest/wallabag
synced 2024-12-24 08:18:48 -05:00
Fixed a bug into PHPePub with special caracters
This commit is contained in:
parent
87090d8ae7
commit
72a857158c
3
inc/3rdparty/libraries/PHPePub/EPub.php
vendored
3
inc/3rdparty/libraries/PHPePub/EPub.php
vendored
@ -343,6 +343,7 @@ class EPub {
|
||||
}
|
||||
$fileName = Zip::getRelativePath($fileName);
|
||||
$fileName = preg_replace('#^[/\.]+#i', "", $fileName);
|
||||
$fileName = $this->sanitizeFileName($fileName);
|
||||
|
||||
$chapter = $chapterData;
|
||||
if ($autoSplit && is_string($chapterData) && mb_strlen($chapterData) > $this->splitDefaultSize) {
|
||||
@ -1699,7 +1700,7 @@ class EPub {
|
||||
while (list($chapterName, $navPoint) = each($this->ncx->chapterList)) {
|
||||
$fileName = $navPoint->getContentSrc();
|
||||
$level = $navPoint->getLevel() -2;
|
||||
$tocData .= "\t<p>" . str_repeat("      ", $level) . "<a href=\"" . $fileName . "\">" . $chapterName . "</a></p>\n";
|
||||
$tocData .= "\t<p>" . str_repeat("      ", $level) . "<a href=\"" . $this->sanitizeFileName($fileName) . "\">" . $chapterName . "</a></p>\n";
|
||||
}
|
||||
} else if ($this->tocAddReferences === TRUE) {
|
||||
if (array_key_exists($item, $this->ncx->referencesList)) {
|
||||
|
Loading…
Reference in New Issue
Block a user