6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
10/22/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#7285] Proposal for new Horde_Text_BBCode package
*
Your Email Address
*
Spam protection
Enter the letters below:
.___..__ .__..__ .___. | [__)| |[__) _/ | [__)|__\| \./__.
Comment
> Hello, > > > > a few moths ago announced I were writing on a new tree based BBCode > parser with > > focus on XHTML 1.0. I also thought it were a great replacement for > the current > > Text_Filter_BBCode package. After much thought though, I decided to > leave the new > > parser out of Text_Filter as it isn't really stackable. This parser > has been written to be > > widely self sustainable (which means it only requires PHP5 and PCRE > to run). This > > also means it isn't really stackable with other packages out of > Text_Filter. The only sane thing to do were probably to stack the XSS > filter on top of it... > > > > Some of the parsers features are: > > - Configurable set of supported tags (all tags can still be > registered at once very easy) > > - Good recognition of free standing links > > - The parser makes a difference between BBCode instructions, text > and links which > > means only things that are meant to be replaced will be replaced > > - No links within links will be created > > - Thumbnail creation for the [img] tag is available > > - Syntax highlighting for the [code] tag is available > > - automagic closing of unclosed tags > > - Correction of incorrectly nested BBCode instructions > > > > The known or suspected issues so far are: > > - If multiple nested BBCode instructions are closed in the wrong > order, the closing > > instructions might be displayed. Everything is nested correctly at > (X)HTML level > > though. So this is just slightly annoying. > > - Lists tend to be a bit pesky at times. it might be possible to > trick the parser into > > generating invalid XHTML. > > - There might be some issues with UTF-16 characters. UTF-8/BMP chars > are fine > > so far. I just haven#t tested this yet > > > > Future features might be: > > - Keyword highlighting > > - XHTML 1.0 Strict compliance > > XHTML 1.1 is out of the scope as this would make it very hard to > place images > > within links, which is a very popular feature... > > - A notification interface > > The parser is very robust... and silent atm. If something fails > somewhere, the parser > > will take care of it on its own and will silently use fallback > routines or default > > settings. While this is great for stability, it is a royal pain to > figure out why a certain > > setting is having no effect at all because the parser figured > somethign were wrong > > > > So, my own feeling is that the code has reached beta quality and I am > going to use it > > in production soon. I think it were a great addition to Horde 4 / > Agora as it does a lot > > of things differently than other parsers and is still quite efficient > (e.g. it outperforms > > PEAR::Text_Wiki_BBCode in terms of speed and memory usage). > > > > A few, final words regarding the attached archive: > > - There is a set of phpDoc generated documentation. I included it > for convenience > > as phpDoc seems to have some issues with the tutorial. > > - There are currently no tests for this package. As I started it, I > had a bunch of .phpt > > tests. But the interface has changed a lot since then so I decided > writing new tests > > using PHPUnit now. > > - The provided interactive example is a bit buggy, so do not take it > as a measurement > > for the maturity of the code. (Specifically this fails for all > settings that are controlled > > by a checkbox. And yes, it is as silly as it sounds). > > > > Well then, have fun :)
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers