Hi,
it seems that when adding a reply from WP Dashboard, wpDiscuz no longer (since v7) applies paragraphs for line breaks in content (no wpautop() being run?). Despite having multiple lines, comment body is displayed in HTML as one paragraph.
What's interesting is that comments added the same way (from Dashboard) with versions prior to v7 are displayed correctly as having multiple paragraphs (although there's no spacing but that's a minor CSS issue).
Also - I've tried editing the comment by manually adding < p > tags but the comment is still displayed as one constant text inside one paragraph. Is it by design or is it a bug?
Yes, I have the same complaint. The behavior in standard WordPress comments is that if you hit "Return" once at the end of a paragraph the line ends with a "<br>." But if you hit "Return" twice Wordpress creates a "<p>".
But even this behavior is clunky. Everywhere else -- including right here in this reply form -- a "Return" produces a new paragraph.
In wpDiscuz v. 7, the behavior is even less intuitive. Hitting "Return" twice at the end of a line just produces a second "<br>". The result of that is just ugly -- big gaps between paragraphs.
I will not upgrade to v.7 until this is addressed. The behavior I want is that a single "Return" produces a new paragraph.
Hi @lflier & @szmigieldesign,
I have no idea how you get that problem. Maybe you use an old version of wpDiscuz, maybe your theme has a hard CSS affection on comment section. In any case, you should provide a direct link to that page where we can see the issue.
Currently, there is no such problem in wpDiscuz, please see the GIF video, and test on the demo:
I'd recommend remove all custom codes and wait for the upcoming 7.0.3 version to avoid any conflicts.
I'm happy to report that 7.0.3 fixed this issue for me.
That's the expected behavior -- new paragraphs at double "Returns".
If anyone wants to get rid of <br> tags altogether and format every new line as a new paragraph, this filter seems to work:
add_filter('comment_text', 'replace_comment_line_breaks' );
function replace_comment_line_breaks($comment_content) {
$comment_content = preg_replace( "/[^ -~]{4}/", "<p></p>", $comment_content );
$comment_content = preg_replace( "/\x0a/", "<p></p>", $comment_content );
return $comment_content;
}