Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect conversion of typed text "[foo][/foo]" to bbcode and back. #176

Open
LapisSea opened this issue Apr 20, 2017 · 0 comments
Open

Comments

@LapisSea
Copy link

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:
image

No fix:
image
My fix:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant