Working with multiple layers of codes
Closed this issue · 3 comments
Hello,
I am having some issues with texts that have multiple layers of bbcode
This is an example:
[color=#ff0000][i][b]dsadasdasdasdsadas [img]http://stag.adservio.ro/plugins/tinymce-4.6.5/plugins/emoticons/img/smiley-kiss.gif[/img][img]http://stag.adservio.ro/plugins/tinymce-4.6.5/plugins/emoticons/img/smiley-money-mouth.gif[/img][img]http://stag.adservio.ro/plugins/tinymce-4.6.5/plugins/emoticons/img/smiley-tongue-out.gif[/img] [img]http://stag.adservio.ro/plugins/tinymce-4.6.5/plugins/emoticons/img/smiley-laughing.gif[/img][/b][/i][/color]
This is translated as:
<span style="color:#ff0000]<em><strong>dsadasdasdasdsadas <img src="http://stag.adservio.ro/plugins/tinymce-4.6.5/plugins/emoticons/img/smiley-kiss.gif[/img][img]http://stag.adservio.ro/plugins/tinymce-4.6.5/plugins/emoticons/img/smiley-money-mouth.gif[/img][img]http://stag.adservio.ro/plugins/tinymce-4.6.5/plugins/emoticons/img/smiley-tongue-out.gif"> [img]http://stag.adservio.ro/plugins/tinymce-4.6.5/plugins/emoticons/img/smiley-laughing.gif[/img"></strong></em></span>
Is there any way I could make this work ?
This is a problem with the code rather then you. In the current state of the code this will never work. This is because similar to the fact that RegEx can't be used to parse HTML nor can it easily parse BBCode. Unless this is fixed. This js-bbcode-parser
will never work.
@SolitudalDeveloper the js-bbcode-parse is a simple BBCode parse. This code works and is successfully used in productive environments. This parser has not the requirement to parse complex bb code.