In order to allow more easy migrating from the old forum engines to AsmBB, I started to write a BBCode markup parser library.
After finished and tested, it will be included in AsmBB engine this way providing second optional markup language for better user experience.
The sources of the engine are of course open and located in the repository here: https://asm32.info/fossil/repo/bbcode
In the attached file (at the end of the post) I included precompiled binaries of the test application, for Linux (
bbcode ) and Windows (
bbcode.exe ), together with my BBCode test file (
test.bbcode ) and some small images, needed for proper display of the rendered page in the browser.
The library generates HTML5 output. Notice that in HTML5 some tags are allowed to not be closed. In the generated output such tags are:
li. All other tags must be closed and if not, it should be considered a bug and fixed.
The binaries for Windows and Linux read the STDIN for BBCode and write the HTML5 output to STDOUT. So in order to convert some BBCode file you need to enter in the console:
./bbcode < test.bbcode > test.html
In Windows you may remove the
How you can help the project
The project needs more tests.
Try to modify
test.bbcode or create your own BBCode test file that crashes the program, or create broken HTML that the browsers can't display properly. Consider the crashes and possible XSS injections as a primary targets.
Report this broken BBCode to me (email to johnfound at asm32 dot info) or attach a file in this thread. I will fix the bugs and update the attached archive accordingly.
Thanks in advance!