Text with [EXAMPLE] take as bbcode
Closed this issue · 2 comments
Hello,
When you place a text to render and it contains brackets even though it is not a BBCODE it tries to render it and the text is no longer displayed.
For example:
Input:
<BBCode plugins={reactPreset()}>
[b]Super [i]easy[/i][/b] [u]to[/u] render [IMPORTANT] text
</BBCode>
Output:
<span><span style="font-weight: bold;">Super <span style="font-style: italic;">easy</span></span> <span style="text-decoration: underline;">to</span> render <important></important> text</span>
Expected output:
<span><span style="font-weight: bold;">Super <span style="font-style: italic;">easy</span></span> <span style="text-decoration: underline;">to</span> render [IMPORTANT] text</span>
For fix this, i need to past a list of allowed bbcodes, but i don't know if another option more easy.
Thanks.
Yes, bbob tries to parse all bbcodes, and when he see [IMPORTANT]
, he thinks this is a single selfclosing bbcode. Only way to change this behavior is a to pass allowed tags, so that bbob ignores other tags
Yes, bbob tries to parse all bbcodes, and when he see
[IMPORTANT]
, he thinks this is a single selfclosing bbcode. Only way to change this behavior is a to pass allowed tags, so that bbob ignores other tags
Thank for the response, it's now clear for me. I'm closing the issue.