modified bbcode newline/paragraph support

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.1.0@42274 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Jeremy Shipman 2007-09-18 23:36:35 +00:00 committed by Sam Minnee
parent 534be77a3b
commit 6cc7f948a0

View File

@ -97,10 +97,11 @@ class BBCodeParser extends TextParser {
function parse() {
$this->content = str_replace(array('&', '<', '>'), array('&amp;', '&lt;', '&gt;'), $this->content);
$this->content = HTML_BBCodeParser::staticQparse($this->content);
$this->content = "<p>".$this->content."</p>";
$this->content = str_replace("\n\n", "</p><p>", $this->content);
$this->content = str_replace("\n", "<br />", $this->content);
return HTML_BBCodeParser::staticQparse($this->content);
$this->content = str_replace("\n", "<br />", $this->content);
return $this->content;
}