Changed the way the comment is handled :

* If the comment is HTML just replace <br> -> </br />
  * Else adapt the comment to html

Should fix #2
This commit is contained in:
Sébastien Lucas 2012-05-30 14:41:06 +02:00
parent 9cac9980c1
commit cd6bf1c1cf
1 changed files with 8 additions and 1 deletions

View File

@ -123,7 +123,14 @@ class Book extends Base {
if (!is_null ($se)) {
$addition = $addition . "<strong>" . localize("content.series") . "</strong>" . str_format (localize ("content.series.data"), $this->seriesIndex, $se->name) . "<br />\n";
}
return $addition . strip_tags ($this->comment, '<div>');
if (preg_match ("/<\/(div|p)>/", $this->comment))
{
return $addition . str_replace ("<br>", "<br />", $this->comment);
}
else
{
return $addition . htmlspecialchars ($this->comment);
}
}
public function getFilePath ($extension, $relative = false)