drogonframework / drogon

Drogon: A C++14/17/20 based HTTP web application framework running on Linux/macOS/Unix/Windows
MIT License
11.63k stars 1.12k forks source link

Add BBCode Parser #686

Open niansa opened 3 years ago

niansa commented 3 years ago

Is your feature request related to a problem? Please describe. Many web applications offer ways to format user comments. And many of them go with bbcode.

Describe the solution you'd like Just a simple function that translates bbcode to html.

Describe alternatives you've considered some way to whitelist specific html tags in HttpViewData::htmlTranslate?

rbugajewski commented 3 years ago

Thanks for the feature request. I think this is a good idea and would be great alongside some Markdown support. In the meantime you can use a third-party dependency. In a quick search I found an open source library called bbcpp. You can also use the BBCode parser in the Godot game engine, but the dependency might be a bit heavy if you just need BBCode support.