Login Register

Experimental BBCode parser needs tests

#15507 (ツ) johnfound
Last edited: 26.09.2018 by johnfound, read: 4159 times

The library

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:

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: html, head, body, p and 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 ./ prefix.

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!

Attached files:
FileSizeUploadedDownloadsMD5 hash
bbcode.tar.gz78064 bytes26.09.20189731d771e0383d1a3f012deb771751bd840

Experimental BBCode parser needs tests

AsmBB v3.0 (check-in: a316dab8b98d07d9); SQLite v3.42.0 (check-in: 831d0fb2836b71c9);
©2016..2023 John Found; Licensed under EUPL. Powered by Assembly language Created with Fresh IDE