thorsten/phpMyFAQ — Issue #364: formatting comments
Author: rzw
Created: 2011-12-08 09:08:39+00:00
State: open

It's a matter of personal preference I suppose, but for the sake of readability I don't like the fact that line feeds disappear in comments, i.e. are replaced by &# 13;&# 10; and therefore without effect - in my browser at least. I modified the code in
inc/Comment.php just a little bit replacing "$item['content']," by "str_replace(-see code below-,$item['content'])," near line 190.
So:

foreach ($comments as $item) {
$output .= '

';
$output .= '';
$output .= sprintf('%s%s:
%s
%s

',
$this->pmf_lang['msgCommentBy'],
PMF_Mail::safeEmail($item['email']),
$item['user'],
str_replace("
","
",$item['content']),
$this->pmf_lang['newsCommentDate'] .
PMF_Date::format(PMF_Date::createIsoDate($item['date'], 'Y-m-d H:i', false)));
}