News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

BB code open/close bug

Started by Black Tiger, February 09, 2017, 09:30:53 AM

Previous topic - Next topic

Black Tiger

I did a search but could not find it so quickly.
For some time now, at least since version 2.0.11, maybe longer, there is a BB code bug with the close code.

It's replicated like this. You want a word or something by using multiple BB codes in 1 line, for example bold and underline.

On forum software,  often users start with closing the bbcodes, with the bbcode you started with. So if you start with the bold BB code, this should be closed first, like this:
example[/u]
now this is where the bug is.
This is created this way:
[b][u]example[/b][/u]

As you can see, the bbcode is already closed by using the closing bbcode /b and then the /u code is displayed as plain text.

Now if we do it the other way around, and start closing the last used bbcode first, it will work correctly like this:
example
which is created like this:
[b][u]example[/u][/b]

This can give odd problems when using bold and underline for example within "li" and "lu" codes if the first example is used.

Even worse... suppose somebody wants to change forum software and several users already used the first way with bbcode, or even worse, using the first way without using the /u end code tag will dislay the word correctly, then this will create tons of underlined text because there is no closing underline bbcode used.
example
done like this:
[b][u]example[/b] which is totally wrong due to missing underling closing tag, but does give the correct display effect.

In anyway, even if SMF should think that only the second BB code is correct, it's still a bug, because when using it the first way, the closing tag should be working too and never be shown as plain text.
I've tested this in PHPBB, vBulletin and PHPFusion and neither have this plain text bbcode closing tag issue. You can do it both ways there.

So IMHO it's a bug in SMF.
Greetings, Black Tiger

Irisado

http://wiki.simplemachines.org/smf/Bulletin_board_code

In my view, it's logical that the bbcode tags only function when placed in the correct order.
Soñando con una playa donde brilla el sol, un arco iris ilumina el cielo, y el mar espejea iridescentemente

Steve

Quote from: Black Tiger on February 09, 2017, 09:30:53 AMIn anyway, even if SMF should think that only the second BB code is correct, it's still a bug, because when using it the first way, the closing tag should be working too and never be shown as plain text.
I've tested this in PHPBB, vBulletin and PHPFusion and neither have this plain text bbcode closing tag issue. You can do it both ways there.

So IMHO it's a bug in SMF.

It's never a bug if it's by design. Closing tags are in reverse order of opening tags. If a person wants to do it the other way and get the correct result SOME of the time that's up to them but Irisado's link clearly shows how it should be done for this software.
DO NOT pm me for support!

Black Tiger

Strange point of view imho.
Because in that case your view differs from every other forum software around. In my view (and other admin's I know), it's a bug as soon as a codes which is used correctly is displayed as text. This never should be the case, not even by design. Even if it was then it shouldn't work at all instead of only partly and using text.
Next to that, I wonder who determines which is the correct order. Users often don't know.
And a strong argument is that even by design, NEVER should option 3 occure which is totally wrong that 2 bbcodes can be ended by one.
That can't be by design because that's totally not how bbcodes should work (not even in the wiki), so that must be a bug anyway.

I always thought forums should be made so every user can make use of it and to prevent users of making errors if possible. That's imho the reason why this "mistake" can't be made with other forum software.
I've 3 arguments (1. The correct order is discutable, 2. users often do know bbcodes but not the order of use, mostly because of point 3, no other forum software has this issue) which can consider this a bug. I don't see any argument why ths is not a bug from you. Especially looking at my 3rd example.

If there's a mod which fixes this it's fine with me too, but bugs should not be mod fixed. I hope this will also be taken care of in 2.1.
Greetings, Black Tiger

Irisado

Have you tested every single other forum software out there?  You have listed three.  As a result, you cannot claim, based on three cases, that 'no other forum software has this issue'.

I continue to disagree that it's an issue.  I'm not a Developer or a coder, but I simply cannot see how, logically, it should be the case that incorrectly ordered bbcode should produce the desired result.  In my opinion, that would make no sense.  I contend, as a result, that is the other software you're referring to which is incorrect and that SMF has it right.

In essence, this is a discussion point over an opinion about how bbcode ought to work in SMF.  That, to my mind, is a matter of perspective, not a bug :).
Soñando con una playa donde brilla el sol, un arco iris ilumina el cielo, y el mar espejea iridescentemente

Black Tiger

Pffff..... now your quible (is that the correct word in English? I'm not English native) Yeah I listed 3, so what? They are 3 of the most important and most used out there. I can add Xenforo too if you want then you really have all the most important and most used once, no issue there and no bbcode issue as described here. Still want to get your right that way?
You'd better show me 3 that have this issue like SMF, LoL, good luck. :D
But we can forget about that if you don't want to discuss this part, I don't mind at all. To me only the bug part is important and it's clear I'm thinking more from a service to users point of view then some of you guys.

QuoteI continue to disagree that it's an issue.
and
QuoteIn essence, this is a discussion point over an opinion about how bbcode ought to work in SMF.  That, to my mind, is a matter of perspective, not a bug :).
Did you even read my complete post? Because I have the impression you did not. And I will explain.

Lets forget about the wrong or correct way of using in example 1 and 2. So we don't have a discussion about how bbcode ought to work in general, not only in SMF. BBCode is not a smf only thing. But that's another discussion so let's forget this part of the discussion completely.

Lets limit the whole thing.
Again I point to example 3. Which is definitely NOT correct way of using BBCode, which I also stated in my previous reply.

Now tell me agian you don't see this as a bug and this is how bbcode should work. Because this does also not stroke with what the wiki is saying. It's a bug, it's something not doing as should be.
That's why I think you don't read my reply's very well because I stated that already before.
Greetings, Black Tiger

Kindred

this is not a bug.

if you purposefully break the standard (tags MUST be closed in a valid order based on the way they are opened) then you can't call it a bug -- call it violating the standard.

As for other systems...   quite honestly, we have never based our design on "well, someone else does it this way"

in example 3, it's still not a bug...  the system tries to close unclosed tags.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Black Tiger

Quotewe have never based our design on "well, someone else does it this way"
You're kidding me. All forums, including SMF have things they do alike. You also have boards and subboards just as other forums do. And maybe the way you code it to get the same result is different, but the result is the same. So that's a non-argument of you. And I don't believe it either.

Quotein example 3, it's still not a bug...  the system tries to close unclosed tags.
That's not consequent. If the system does not care about the "wrong" order of closing tags, it should not care about if it's closed or not either because that's also wrong use!
At least that way the user can see that he did it wrong, either by the textual bbcode appearing or by the fact that his text stays in bold or underlined or whatever code was used.

Anyway, even if you don't call it a bug I'm again amazed about the lack of a service to users point of view. I'm sorry to say it but sometimes it seems as if people here find it more important to get their right then to improve things in the benefit of users, bug or not.

I know it's free and a lot of work, so are some others. Why not try to improve this in 2.1? It's beneficial for users as well as for admins.
Because this will fix issues exporting to other forum systems as wel as other forum admins (with "wrongly" used bbcodes) which are going to convert to SMF.
I don't think it will be that big a code fix. Why not fix it? Even in 2.1? Even if you don't want to call it a bug?
Greetings, Black Tiger

Illori

sorry but we require our bbc code to meet the html standard, we have not wasted our developers time to code the parser to fix the mistakes of the users. it is easier to require the tags to be opened and closed in the same order. there are also some bbc tags that cant be used within others, i guess you would call that a bug too, but it is going according to the html standard.

Kindred

well, obviously, you don't have any idea what's actually involved in the BBC coding...

that aside....   I, like the others, maintain that ity's not a bug and doesn't need to be "fixed"

However, if YOU want to code the "fix" and submit it as a PR on GitHub for 2.1, please, go ahead!
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Black Tiger

It might not be a bug but it's pity you think this way. I can add IPB too by the way.
My idea was not "you should do this because others do it too" but "if so many other important and much used forumssoftware are preventing this issue, there must be some very good arguments for it since they are all doing it".

But it seems as if somebody says something like this here to make a point that it might be important, people are right stepped on their toes instead of thinking in a positive way.
Even the fact that the system is working inconsequent with the rule "it should work as in the wiki" at the moment, saying A but not B is not interesting you. You don't even want to think about improving this.

Due to your answer it's clear you want to be and keep stubbern and refuse to make things more better. Says enough.
And again, i'm not the only one who think this way, I was asking this because there were more people asking this, admins and mods on mine as well as on another forum, including some users who wondered what they did wrong and text appeared.

I'm clearly NOT going to go on github to make suggestions for people who don't want to make improvements anyway.
For this reason I'm going to close this bug notice or request to improvement, because it's talking to a wall here if you have improvement ideas, even in non bug sections.
Greetings, Black Tiger

Irisado

Quote from: Black Tiger on February 09, 2017, 12:06:58 PM
Pffff.....

Do you really think that starting a reply in this manner is likely to persuade us to be more supportive of your point?

QuoteYeah I listed 3, so what?

You made a false claim.  It matters when someone makes a point as though it is a fact when it is anything but.  You stated that no other forum software had this issue.  You had and still have yet to present evidence to back up that point, so while you're entitled to your own opinion, you're not entitled to your own facts, hence what you said matters.

QuoteYou'd better show me 3 that have this issue like SMF, LoL, good luck. :D

Other forums can operate differently, and it is not a problem for me :).

QuoteNow tell me agian you don't see this as a bug and this is how bbcode should work. Because this does also not stroke with what the wiki is saying. It's a bug, it's something not doing as should be.
That's why I think you don't read my reply's very well because I stated that already before.

It's just logic.  As Kindred says, the system is trying to close unclosed tags.  That is not a bug.

Quote from: Black Tiger on February 09, 2017, 01:07:42 PM
My idea was not "you should do this because others do it too" but "if so many other important and much used forumssoftware are preventing this issue, there must be some very good arguments for it since they are all doing it".

If you had just asked the question out of curiosity, rather than tried to insist that it was a bug, you may have received a different response.

QuoteEven the fact that the system is working inconsequent with the rule "it should work as in the wiki" at the moment, saying A but not B is not interesting you. You don't even want to think about improving this.

The wiki explains how bbcode works, so i don't understand the problem here.

QuoteAnd again, i'm not the only one who think this way, I was asking this because there were more people asking this, admins and mods on mine as well as on another forum, including some users who wondered what they did wrong and text appeared.

You can explain to them how to write bbcode correctly and the problem is solved :).

Quote
For this reason I'm going to close this bug notice or request to improvement, because it's talking to a wall here if you have improvement ideas, even in non bug sections.

Untrue.  The Development Team and others work hard to fix genuine bugs in the software, especially for 2.1.  What you are complaining about is not a bug, and that is why it is not going to be fixed.
Soñando con una playa donde brilla el sol, un arco iris ilumina el cielo, y el mar espejea iridescentemente

Steve

Shall we move this to Fixed or Bogus Bugs despite Black Tiger's right to his opinion since it's not actually a bug? :)
DO NOT pm me for support!

Dzonny

I don't see how would bad coded stuff "fix issues exporting to other forum systems", I'd rather say that more logic approach would be to actually use correct syntax, like SMF does. So, I have to agree with what was said already - I don't think this should be considered as a bug.

Gluz

The key here is that SMF require the user to use the HTML standard to open and close the tags as they where opened.

IPB handles that case, but that is closing the missing tag first and then delete the closing tag that is after and is leftover, that require some more processing power (a little for one, but lets say that a post have hundreds of tags inverted, is not that little).

From a coder point of view, that is not the best choice, and that encourages the bad use of open and close tags, breaking the standard, like Internet Explorer did for the web standards for many years (they force web developers to do things in certain way to display everything fine in IE breaking the standards).

Is better to teach users to do the things right and not to fix their mess after without the user notice the way they do is wrong.

Black Tiger

@Steve: I was already convinced that it's not a bug. But there is at least in inconsistancy, if you want to do things right, do it all the way and not half way by implementing a closing tag check only.
No that's not a bug either. But it is inconsistent checking and confusing users. It's just not needed to confuse users and point out and learn them the very strict way of how things should be done exactly by the rules of SMF. Or otherwise, do learn them, but then in not only half way.
So the user most follow exact bbcode rules but the system does not? Because there is a closing tag check? Strange. It's good service to the users, but in that case, when you say A, also see B and it could be improved so users can't make mistakes anymore.

@Irisado:
QuoteIf you had just asked the question out of curiosity, rather than tried to insist that it was a bug, you may have received a different response.
I doubt that a very lot. I have ask things different in the past. I always have the feeling I have to walk on my toes to ask questions here to prevent somebody feeling bad. I'm not native English, could be also part of my way of writing stuff. Nobody's perfect.
But I even got "can't be done" answers from some, in spite of the fact that later on it could be done. So it's quite logic that I try to insist to bring over my point of view. Ofcourse I also know that can't always be the case, no problem.
That's why I stated at last to forget the discussion about the correct order. Then oke, no bug, but in that case there is room for improvement.
And at first I was not convinced that there was (in a global matter, not only on SMF) a correct order, so I wasn't convinced that quickly.

QuoteDo you really think that starting a reply in this manner is likely to persuade us to be more supportive of your point?
What did you expect after your answer? Do you really think you get nicer reply's when starting an answer before asking obsolete questions where you already know the answer to and which don't matter since I already got the most important forums tried?
And clearly only on SMF (of the most known then) seem to have the opinion it must and shall be done in the correct order.

QuoteYou made a false claim.
A bit childish response and partly untrue. I named the most important and most used ones, and even added another most used. It's quite logical you can't check all and every one there is out there. It's quite normal to use that term if all the most known things are checked.
Which exactly proves my point that you have to walk on your tose to ask something here, if you're going to attack people if they use "all" (by mentioning all the most used and known) instead of "most".
I rather believe that you were already stepped on the toes because I mentioned the check of all these other forums I did, instead of looking at that the positive way. Like asking yourself "indeed" why should they to this then because it takes a lot of coding?

@Dzony:
QuoteI don't see how would bad coded stuff "fix issues exporting to other forum systems",
I'll try to explain a bit better then....
On most other known systems, there is no order rule, well there is but it doesn't matter because it works either way. But in anyway users can consequently do it the "wrong" way on other forum software.
If you convert from those other software to SMF, it will be an issue, because of this kind of strict rules for bbcode use.
So on forums exported to SMF on the to SMF converted forum you will get a lot of textual bbcode closing tags.
As for exporting. When users only use 1 close tag, which is quite possible on SMF, on exporting to other systems there will be a problem because not both code tags are closed and at least several of them don't have a "close tag check". So lots of text will get underlined or bold or whatever tag is not closed. I hope this is a better explanation of what can go wrong and you can see it now?
Following strict rules, this closing tag should not even be needed. And as said better not use that check because that way the user instantly sees he's doing something wrong. There's no bad in that.

@Gluz: I don't know how IPB is handling it, but most of the known ones are handling it some how. Maybe they coded it some way to just accept it when closing tags are done the other way around. It's just very striking that they "all" are doing it. That must have very good reasons, because when it is that much programming work as you say, they would only build in a closing check like SMF did.

QuoteIs better to teach users to do the things right and not to fix their mess after without the user notice the way they do is wrong.
I totally agree with you here, that's why the closing tag check is inconsistent with that thought. Don't fix their mess, let them see they did it wrong otherwise they never learn.
Greetings, Black Tiger

Steve

Quote from: Black Tiger on February 09, 2017, 07:48:18 PM
@Steve: I was already convinced that it's not a bug. But there is at least in inconsistancy, if you want to do things right, do it all the way and not half way by implementing a closing tag check only.
No that's not a bug either. But it is inconsistent checking and confusing users. It's just not needed to confuse users and point out and learn them the very strict way of how things should be done exactly by the rules of SMF. Or otherwise, do learn them, but then in not only half way.
So the user most follow exact bbcode rules but the system does not? Because there is a closing tag check? Strange. It's good service to the users, but in that case, when you say A, also see B and it could be improved so users can't make mistakes anymore.

If this is in response to my last post I was just asking the other team members if this thread should be moved. I could have done it myself but I'm the new kid on the block so I just wanted to be sure.

And as I said, you definitely have a right to believe what you do. We just happen to disagree. :)
DO NOT pm me for support!

Black Tiger

QuoteWe just happen to disagree.
We don't disagree about the fact that it's not a bug. It isn't a bug indeed. :)
Feel free to disagree with me on the rest, I don't mind, it's every persons good right to have their own opinion. ;)
Greetings, Black Tiger

Chen Zhen

Quote from: Black TigerI don't know how IPB is handling it, but most of the known ones are handling it some how. Maybe they coded it some way to just accept it when closing tags are done the other way around. It's just very striking that they "all" are doing it. That must have very good reasons, because when it is that much programming work as you say, they would only build in a closing check like SMF did.

I haven't looked at how other forum/blog projects handle it but Imo they likely filter a post at the time of saving it.
Possibly parse all bbcode tags to HTML, use a HTML purify routine (ie. * using an existing proven safe HTML purifier routine here: http://htmlpurifier.org/ ) & then possibly parse the "standards compliant" HTML elements back to bbcode to save into the database.


My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Black Tiger

I wouldn't know, but if that's possible there is a good chance it's done like you say. I'm no programmer.
Anyway, best way is to learn the users to use correct routine for as far as possible. They will never learn if mistakes aren't properly shown every time.
From the other side, luckily a lot of users make use of the wysiwig editor where you can click on the bbcodes, so they will be put there for them in a correct way.
This benefit don't have others who make use of the quickreply function.
Greetings, Black Tiger

Advertisement: