jbowens / jBBCode

A lightweight but extensible BBCode parser
http://jbbcode.com
MIT License
164 stars 32 forks source link

Parser does not recognize tag if bbcode is used in option #68

Open Rall3n opened 8 years ago

Rall3n commented 8 years ago

As said above:

I´m trying to use a "quote" CodeDefinition that can be used with or without option! Both work, but when I want to use other jBBCode tags inside the option parameter of the quote tag, the first tag in the option loses its opening bracket and the parser can`t recognize the quote tag itself because of it!

E.G: [quote=[b]test[/b]]testing[/quote]

Output: [quote=b]test[/b]]test123[/quote]

I tried using quotation in the option, but it was the same result!

Anyone got an idea how I could fix/make a workaround for this?

Art4 commented 8 years ago

Don't do that. You shouldn't markup the option parameter as you wouldn't markup it in HTML.

E.g. this isn't useful too: <blockquote cite="<b>parameter</b>">content</blockquote>

The option parameter shouldn't contain content. It should only contain metadata about the "real content".