Forum Moderators: coopster
My problem is this, I've discovered that when an value has a space within the value the value is truncated at the first occurrence of the space. This applies to a URL, image file names and any additional attribute values (alt, style, etc.). This issue is present in the stable release and latest release in CVS for HTML_BBCodeParser. Here is some examples.
Before BBCode Parser
Foo World [somedomain.com]
After BBCode Parser
<a href="http://www.somedomain.com/Foo">Foo World</a>
Before BBCode Parser
[img w=100 h=99 alt=Enthalpy Wheel]/images/Enthalpy Wheel.png[/img]
After BBCode Parser
<img src="/images/Enthalpy" width="100" height="99" alt="Enthalpy" />
Before BBCode Parser
[p style=foo bar]something here[/p]
After BBCode Parser
<p style="foo">something here</p>
Before BBCode Parser
[div style=color:blue; font-size: 1em;]something here[/div]
After BBCode Parser
<div style="color:blue;">something here</div>
This problem appears to exist across the board even without additional BBCode tags or additional attributes.
Any suggestions on how I resolve this problem would be much appreciated.
[edited by: The_Warden at 9:33 pm (utc) on April 18, 2007]
I've never used the PEAR package for this so I cannot say I've run into this same problem. You did say that you have some custom code in there, too. Did this problem arise before or after that custom code was added? You might just be better off writing the whole thing yourself. It's actually quite simple. There are a few threads [google.com] around here that might help you get started.
Another alternative to this would be to post an example of your code and we can try to work it out from there. I'm not quite sure how efficient this will be, though.
As for posting the code. Well I've given examples of BBCode that cause the problem. Other than that really the code is at the web site for download, [pear.php.net ].
Hello,I've never used the PEAR package for this so I cannot say I've run into this same problem. You did say that you have some custom code in there, too. Did this problem arise before or after that custom code was added? You might just be better off writing the whole thing yourself. It's actually quite simple. There are a few threads around here that might help you get started.
Another alternative to this would be to post an example of your code and we can try to work it out from there. I'm not quite sure how efficient this will be, though.