0

Since a couple of days I've been getting this strange error while using Zend_Markup Bbcodes. In simple words, the content which I'm trying to render will return with a lot of
html elements. To be precisely, after all the < p > tags and all the 'n\' new lines are getting replaces by it. When I'm dont render my content with the Zend_Markup renderer, its all good without any extra additional < br > tags.

I've been searching the interweb for a good fix, but it looks like no one else had this problem before :P. I'm guessing it had something to do with the filtering...

Example:

<p>Helloworld</p>

<p>And again Helloworld</p>

Will get returned as follow

<p>Helloworld</p>
<br>
<br>
<p>And again Helloworld</p>
<br>
<br>

Again, if turned off... everything goes like it should! But with out the great 'Bbcode' rendering functionality :'(

Thanks in advance guys!

Willem Poortman
  • 121
  • 1
  • 13
  • Zend_Markup is meant to turn plain text into HTML. What exactly are you wanting to happen here? – Tim Fountain Aug 22 '13 at 14:45
  • Yeah, I'm using the BB features and build my own markup renderer's. Everything goes as plan and didn't run into any hard problems. The only strange thing is that it for some reason does the above mash up. – Willem Poortman Aug 23 '13 at 06:35
  • Isn't there any one who can help me further with this problem? I'm sure someone has a strong solid solution for it. – Willem Poortman Aug 26 '13 at 07:16

1 Answers1

0

Oke, after many hours debugging and doing tons of research and Google queries. I finaly solved my problem (for now and a bit dirty). It appeared to be a bug in the Zend Markup library cause of the fact that it was some last quick and rushed code right before one of the releases of ZF1. http://www.dasprids.de/blog/2010/02/28/why-i-am-not-using-zend_markup

Solution: Comment out rule 312 in the Zend_Markup_Renderer_RendererAbstract class.

I will move in a little deeper into this subject when this project is finished. A quite a relief is that the Zend_Markup bug is or will get fixed in ZF2.

Willem Poortman
  • 121
  • 1
  • 13