Hello, I have been playing with this wonderful editor and I was checking out how it handles special characters like <> and [] and I discovered that if you type [b][/b] as text it will not do anything to mark that peace of text as a "not bb code element" when converting to bbcode to protect itself from parsing that peace as an element.
Now I fixed this with a simple
htmlText.replace(/\[/b, "\\[").replace(/\]/b, "\\]")
just before parsing html text to bbcode and vice-versa before parsing bbcode to html.
Problematic text:
Hello, I have been playing with this wonderful editor and I was checking out how it handles special characters like <> and [] and I discovered that if you type [b][/b] as text it will not do anything to mark that peace of text as a "not bb code element" when converting to bbcode to protect itself from parsing that peace as an element. Now I fixed this with a simple
htmlText.replace(/\[/b, "\\[").replace(/\]/b, "\\]")
just before parsing html text to bbcode and vice-versa before parsing bbcode to html. Problematic text:No fix: My fix: