SMF Development > Fixed or Bogus Bugs
BBCodes: Special characters cause parameters not to be separated
Arantor:
Thing is, nothing is 'broken'. It is working as it was designed to work. Whether that's a bad design is another question entirely.
The reason for it is performance. The more parameters you have that are optional, the more permutations have to be accounted for. This is why, for example, there are 5 separate instances of the quote bbc, multiple instances of img bbc, for the discrete list of supported parameters. If you were to separate it into a single all-in-one as you're proposing, it would actually be quite a bit slower than it currently is. (I know, I've tried.)
emanuele:
--- Quote from: MrPhil on May 26, 2012, 10:17:41 AM ---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?
--- End quote ---
I draw the line exactly where the implementation is done in a certain way for a certain purpose.
If something is done for that reason, then it's not a bug, but a feature request.
--- Quote from: MrPhil on May 26, 2012, 10:17:41 AM ---Is this a major SMF design flaw?
--- End quote ---
The fact that parse_bbc would need "a bit" of reqork I think it's as old as SMF.
Call it a "major design flaw"...well, it works and you are using it every day I don't see it so major...
--- Quote from: MrPhil on May 26, 2012, 10:17:41 AM ---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.
--- End quote ---
It is working.
You cannot define all parameters as optional, it's enough to add a new tag without parameters...I don't think it's so overwhelming for a developer...the fact that most likely it's not documented anywhere is another problem. :P
emanuele:
Ah, for the record (I didn't consider it before) there is also another option: use a custom validation function (the same done with the tag img). :)
Navigation
[0] Message Index
[*] Previous page
Go to full version