mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
534be77a3b
commit
6cc7f948a0
@ -97,10 +97,11 @@ class BBCodeParser extends TextParser {
|
||||
|
||||
function parse() {
|
||||
$this->content = str_replace(array('&', '<', '>'), array('&', '<', '>'), $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;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user