Question

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!

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top