Script Summary: Some forums have disabled BBCode (UBBCode) leaving them hard to read. This script is designed to work with vBulletin and convert BBCode into HTML.
It does this in a three step process.
- Scan for sections that should contain BBCode.
- Scan those sections for BBCode tags and isolate those tags and make them individual elements, building a table of tags in the process.
- Use the table to reconstruct the tag tree.
- Step 1 could be improved (currently uses 3 xpath expressions).
- Better stripping of VBulletin inserted spaces.
- Reverted a change in how it handles code.
- Added support for text formatting tags in code blocks, (it's a bad hack and the wrong solution but it's easier then doing it right)
- Remove double spaces from urls.
- Shortening the display of long URLs to 65 charcters.
- handling of img tags in such a way as to allow for it not to step on the toes of native img handling.
- Stripped BR tags from code & php tags.
- Better error detection and recovery.
- Ability to parse non-bbcode urls into links (not perfect but it's a good hack)
- Small bug fixes.



