Fix epubreader when title contains ' or ". re #52
This commit is contained in:
parent
604f72d860
commit
aa40bb6feb
|
@ -40,7 +40,7 @@ $book->initSpineComponent ();
|
||||||
<?php echo "return [" . implode (", ", array_map (function ($comp) { return "'" . $comp . "'"; }, $book->components ())) . "];"; ?>
|
<?php echo "return [" . implode (", ", array_map (function ($comp) { return "'" . $comp . "'"; }, $book->components ())) . "];"; ?>
|
||||||
},
|
},
|
||||||
getContents: function () {
|
getContents: function () {
|
||||||
<?php echo "return [" . implode (", ", array_map (function ($content) { return "{title: '" . $content["title"] . "', src: '". $content["src"] . "'}"; }, $book->contents ())) . "];"; ?>
|
<?php echo "return [" . implode (", ", array_map (function ($content) { return "{title: '" . addslashes($content["title"]) . "', src: '". $content["src"] . "'}"; }, $book->contents ())) . "];"; ?>
|
||||||
},
|
},
|
||||||
getComponent: function (componentId) {
|
getComponent: function (componentId) {
|
||||||
return { url: "epubfs.php?<?php echo $add ?>comp=" + componentId };
|
return { url: "epubfs.php?<?php echo $add ?>comp=" + componentId };
|
||||||
|
|
Loading…
Reference in a new issue