Changed bbcode line break support to support paragraphs too

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

View File

@ -97,6 +97,8 @@ class BBCodeParser extends TextParser {
function parse() {
$this->content = str_replace(array('&', '<', '>'), array('&amp;', '&lt;', '&gt;'), $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);
}