17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1083 Views |
-
how do i fix this text BlogEntry formatting issue?

12 January 2008 at 7:37am Last edited: 12 January 2008 7:39am
When building a blog entry, if i use the 'code' element (or others that I've added to the mix), any double carriage-return gets parsed into a closing paragraph tag and a new opening paragraph tag.
(i've had to replace the [ and ] marks and < and > tags but you'll see what I mean)
So doing something like:
{code}my first line of codesecond line{/code}
This obviously causes XML errors, since the parsed content looks something like:
(pre)my first line of code(/p)(p)second line(/pre)
How would I 'fix' this, where the line feeds are all just interpreted as break tags instead of paragraph tags, only when in a 'code' element?
-
Re: how do i fix this text BlogEntry formatting issue?

12 January 2008 at 7:45am
Found it ... sapphire/parsers/BBCodeParser.php
Commented out this line around line 107 or so:
$this->content = str_replace("\n\n", "</p><p>", $this->content);
| 1083 Views | ||
|
Page:
1
|
Go to Top |

