Fix epubreader when title contains ' or ". re #52

This commit is contained in:
sb domo 2014-03-20 09:12:42 +01:00
parent 604f72d860
commit aa40bb6feb
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ $book->initSpineComponent ();
<?php echo "return [" . implode (", ", array_map (function ($comp) { return "'" . $comp . "'"; }, $book->components ())) . "];"; ?>
},
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) {
return { url: "epubfs.php?<?php echo $add ?>comp=" + componentId };