[dev] Possible replacement for Text_Filter_BBCode

Chuck Hagenbuch chuck at horde.org
Sun Mar 16 03:10:53 UTC 2008


Quoting Stephan Hohmann <webmaster at dasourcerer.net>:

> I've been working on a BBCode parser for a while now and I am so convinced of
> its qualities that I think it might be a suitable replacement for the current
> Text_Filter_BBCode class.
>
> The initial motivation was to find a new parser for a forum that I maintain.
> For our next release we planned to have XHTML output. This soon prooved to
> be a problem, since most available parsers won't check for the validity of
> their output and will only perform search/replace operations via str_replace
> (or preg_replace if they are a bit more sophiscticated). This is critical as
> not all combinations of BBCodes will lead to valid (X)HTML. I found  
> this to be a good test for parsers:
>    [i]foo [b]bar[/i] baz[/b]

Aside from XHTML (a laudable goal, but one that could be taken care of  
with tidy also if that's what you need), does this add any features or  
fix bugs compared to the current parser?

To be honest this is a pretty little-used part of Horde, so to add a  
much more complicated parser here, we'd need a pretty big reason.

-chuck


More information about the dev mailing list