Hi ivoatt,
You need to explicitly allow some html tags to bypass html escaping. For example, simple plugin like this will pass unescaped <b> tag to be saved to a database.
<?php
use Flarum\Event\ConfigureFormatter;
use Illuminate\Contracts\Events\Dispatcher;
return function (Dispatcher $events) {
$events->listen(ConfigureFormatter::class, function (ConfigureFormatter $event) {
$configurator = $event->configurator;
$configurator->HTMLElements->allowElement('b');
});
};
You can find more details in @JoshyPHP TextFormatter docs