SMF Development > Fixed or Bogus Bugs

BBCodes: Special characters cause parameters not to be separated

(1/2) > >>

Yoshi:
Hi!

After writing a BBCode which accepts "%" in a parameter, I found this bug (with MrPhil's help, really).

Take a look at this topic which should explain it all:
http://www.simplemachines.org/community/index.php?topic=474519.msg3317607#msg3317607

Basically if I do something like this:


--- Code: ---[catbar width=50% icon=http://blah.com/icon.png]Test[/catbar]
--- End code ---

The space between the % and icon= doesn't get recognized and the parameters get merged into "width".

If I switch the two, like this:

--- Code: ---[catbar icon=http://blah.com/icon.png width=50%]Test[/catbar]
--- End code ---
It works.

Yoshi:
Any updates on this?

Arantor:
Since there were no replies, there are no updates...

In any case, the bug isn't actively present in SMF in the sense that nothing in SMF currently as distributed is broken - all the supplied features work, and that new code is tricky.

What you're asking for is actually a non-trivial change to the thousand or so active lines in the BBC parser.

emanuele:
That not exactly a bug.
You are using both parameters as optional and that is not supported by SMF.

See the quote tag for an example.
If both are optional you have to define at least three tags:
1) one without any parameter,
2) one with only width (for example),
3) and one with icon non-optional and width optional.

Arantor was faster... :P

MrPhil:
Why can't all parameters be optional? What I'm hearing is that "optional" isn't entirely so. If that's not a bug, then where do you draw the line? Is this a major SMF design flaw? To say "nothing is broken" is not quite on the level... what should be reasonably expected to work isn't working and at a minimum requires documenting.

Navigation

[0] Message Index

[#] Next page

Go to full version