From 534be77a3b7bacafb502cf4a4f9255f2be9d1deb Mon Sep 17 00:00:00 2001
From: Jeremy Shipman
Date: Tue, 18 Sep 2007 23:18:58 +0000
Subject: [PATCH] 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
---
parsers/BBCodeParser.php | 2 ++
1 file changed, 2 insertions(+)
diff --git a/parsers/BBCodeParser.php b/parsers/BBCodeParser.php
index 3a21d5e87..ec866ec15 100644
--- a/parsers/BBCodeParser.php
+++ b/parsers/BBCodeParser.php
@@ -97,6 +97,8 @@ class BBCodeParser extends TextParser {
function parse() {
$this->content = str_replace(array('&', '<', '>'), array('&', '<', '>'), $this->content);
+ $this->content = "".$this->content."
";
+ $this->content = str_replace("\n\n", "
", $this->content);
$this->content = str_replace("\n", "
", $this->content);
return HTML_BBCodeParser::staticQparse($this->content);
}