Re: BBCodeParser massive update (/me cries)

From: Date: Thu, 06 Oct 2005 06:53:41 +0000
Subject: Re: BBCodeParser massive update (/me cries)
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-40100@lists.php.net to get a copy of this message
Bonjour, Sorry for my late answer, Seth Price wrote:
So, I just spent a few days working on BBCodeParser, in part to make it more bullet proof for my own website. I'm almost done. - It can clean up some fairly painful BBCode. - It produces XHTML 1.1 - It is backwards compatible with older BBCode (although two things aren't supported in XHTML 1.1 without javascript; I'm ignoring those attributes) - It fixes most of the bugs listed on the package home page.
After analyzing your code and the changes you brought, I really don't believe that will solve the problems with this package, sorry to tell that. Actually, the whole structure was borked from the beginning, I see no point to reinvent a tree manager to parse BBCode, so it's vain to go ahead in this direction and make the code even more complicated. Text_Wiki 's treeing is implicit. The problem is the produced script is quite unmaintainable (as you painfully experienced) Also you don't respect coding standards and you change some default (quotes). Your XSS filtering is naturally an enhancement, but it's not complete. Text_Wiki has it from the conception. Finally, the Text_Wiki solution brings the great advantage to enable other rendering than Xhtml plain-text or Latex but also wiki markup. For example, I could convert a BBCode forum to Tiki syntax using it. We look forward to have more rendering (and parsing) as PdF , DocBook, OpenOffice.org or mediawiki.
Then, on a whim, I checked the pear-dev list. I read that you are scrapping it. You guys should really mention things like this on the package's home page. Should I continue to work on BBCodeParser or will it be obsoleted anyway? Also, is the wiki parser stack based?
Implicitely, it's token based.
I was just about to make some finishing touches to make it fully XHTML 1.1 compliant, start to make it configurable "on the fly", and maybe add a smilies filter. You can download the current version that I'm working on here and see how it is: http://pricepages.org/bbcode/BBCodeParser.zip Here is a list of test cases that it currently passes. Can the current wiki parser make sense of these? I'm particularly happy with my list parsing, although I've spent quite a while refining the URL code.
I think Text_Wiki_BBCode would pass the tests the same. (btw it's not in your zip) I would be really happy if you could implement it with the Text_Wiki engined one as described in http://cvs.php.net/pear/Text_Wiki/doc/README_BBCodeParser The HTML_BBCodeParser "clone" is in the same directory untill we install it as full replacement. I would appreciate to incorporate your test in the future package. If you're interested, I would be happy to invite you as co-maintainer. Please, take a look on the way Text_Wiki works and give us your feeling about it. Again, sorry if you feel your work is wasted, but it's very common in the job, we often need to undo/redo. My experience shows that when it's really too bad, then better scrap the whole and rebuild in a better design, and the existing design *is* too bad. If you want to discuss it or you need some help, I'm the most often on IRC #pear by EFNet or FreeNode. Looking forward your answer. à+ -- bertrand "toggg" Gugger

« previous php.pear.dev (#40100) next »