Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: Am' on May 28, 2010, 10:44:52 AM

Title: [3553]Bbcode problem
Post by: Am' on May 28, 2010, 10:44:52 AM
Hi,

look at this message, bbcodes does not work:

TEST
[/size]

[size=14pt][center]TEST[/center][/size]

while here if it works:

TEST

[center][size=14pt]TEST[/size][/center]

most users of my forum contact me for this problem ...
Title: Re: Bbcode problem
Post by: Acans on May 28, 2010, 11:23:38 AM
I don't think thats a bug seeing as centre tags normally come first, so than you add your color and your sizing.
Title: Re: Bbcode problem
Post by: Am' on May 28, 2010, 11:32:58 AM
Quote from: α¢αηѕ on May 28, 2010, 11:23:38 AM
I don't think thats a bug seeing as centre tags normally come first, so than you add your color and your sizing.

yes I know

but novice user do not know that, for them it is a bug

So you really find a solution above ;)
Title: Re: Bbcode problem
Post by: Adish - (F.L.A.M.E.R) on May 30, 2010, 06:18:50 AM
Quote from: Am' on May 28, 2010, 11:32:58 AM
Quote from: α¢αηѕ on May 28, 2010, 11:23:38 AM
I don't think thats a bug seeing as centre tags normally come first, so than you add your color and your sizing.

yes I know

but novice user do not know that, for them it is a bug

So you really find a solution above ;)

There is no solution for it I suppose. It is the same with PHP coding aswell.

This works:
<center><font size="3">text</font></center>

This will not:
<font size="3"><center>text</center></font>
Title: Re: Bbcode problem
Post by: Am' on May 30, 2010, 06:24:24 AM
beh why it's work perfectly in phpbb, ipb and vbulletin ?

surely there must be a solution :P
Title: Re: Bbcode problem
Post by: Windy on June 09, 2010, 11:48:34 AM
I think I'm going to agree that it should work, or rather at least parse the tags correctly so the html generates as the user intended even though the browser may not produce the desired result.
Title: Re: Bbcode problem
Post by: Arantor on June 09, 2010, 12:07:08 PM
Then you will have all kinds of issues with tags not being nested correctly; the whole point is that you can't have block tags inside non block tags, which not only is invalid XHTML, but can produce some very messed up results unintentionally.
Title: Re: Bbcode problem
Post by: Windy on June 10, 2010, 03:05:40 AM
I suppose, but the way it's handled more or less gives the impression that the parser is broken rather it being the fault of the user.
Title: Re: Bbcode problem
Post by: Arantor on June 10, 2010, 03:17:54 AM
I agree, yet I have no better solution to add to the party.
Title: Re: Bbcode problem
Post by: MultiformeIngegno on June 11, 2010, 01:49:24 AM
Maybe we can add it to mantis and tag it as "2.1"....
Title: Re: Bbcode problem
Post by: Nao 尚 on June 24, 2010, 11:22:25 AM
I guess so.
But I have a bad feeling about that bug... :P
Title: Re: Bbcode problem
Post by: Am' on July 10, 2010, 04:38:22 PM
any news ?  :D
Title: Re: Bbcode problem
Post by: Nao 尚 on July 10, 2010, 05:05:46 PM
It was tracked last year already.
http://dev.simplemachines.org/mantis/view.php?id=3553
Title: Re: Bbcode problem
Post by: Kindred on July 11, 2010, 11:44:07 AM
I, honestly, do not consider this a bug.

Just because other forum softwares do not subscribe to HTML standards does not mean that we should be breaking them.
Title: [3553] bbcode
Post by: vivid on June 15, 2011, 09:22:58 AM
Hi,

Please see these points about text-formatting:

I formatted my whole topic (color and size).
Then I formatted the second line with different color.
Then I formatted the third line as (code).
Then I formatted the fourth line with different color.

the result is: the formatting after the (code) is destroyed.
and in the last line the bbcode brackets is showed literally.

Plz see the attached pic may be I did not explain obviously.




[color=blue][size=18pt]
bbcode test bbcode test bbcode test bbcode test bbcode test

[color=green]bbcode test bbcode test bbcode test bbcode test bbcode test [/color]

[code]bbcode test bbcode test bbcode test bbcode test bbcode test [/code]

[color=brown]bbcode test bbcode test bbcode test bbcode test bbcode test [/color]

bbcode test bbcode test bbcode test bbcode test bbcode test
[/size][/color]

Title: Re: bbcode
Post by: emanuele on June 15, 2011, 09:47:24 AM
SMF version?

Assuming you are using the 2.0, are you using the WYSIWYG editor?

Ah, probably I get what you mean.

You wrote 4 lines, then selected all of them and changed size and color. Then selected line 2 and changed color, selected line 3 and assigned code, selected line 4 and changed color.
Am I right?
Title: Re: bbcode
Post by: Illori on June 15, 2011, 09:50:23 AM
i am not sure if code bbc is supported in the WYSIWYG editor, i think arantor had a post about this before in this board.
Title: Re: bbcode
Post by: emanuele on June 15, 2011, 09:51:48 AM
See my edit.

It happens also withou WYSIWYG, but I don't know if it can be considered a bug...it's a wrong BBCode nesting.
Title: Re: bbcode
Post by: Illori on June 15, 2011, 03:58:56 PM
related to http://dev.simplemachines.org/mantis/view.php?id=4071 ?
Title: Re: bbcode
Post by: emanuele on June 15, 2011, 05:21:15 PM
In fact it depends on vivid's answer.
If I understood correctly it's not at all related to the WYSIWYG.

It's just a sequence of operations done with the formatting buttons:
1) write 4 lines of text,
2) select all of them and change size and color using the formatting tools (i.e. the drop down lists, or otherwise put a color and/or size tag around the entire text),
3) select the second line and change the color (same as above with the drop down list, or put a color tag around the second line),
4) select the third line and apply the code tag with the code button (or put code tags around the third line)
5) (optional) select the last line and change color (again with the tool or putting color tags)
It will end up with some tags improperly closed.

The fact is that "block level" tags (code and quote for example) break the formatting applied to the entire post (i.e. those applied at step 2) because the formatting itself is not a block level tag. and the result in that case are some closing tags leftover at the end of the post.

I think is this one (http://dev.simplemachines.org/mantis/view.php?id=3553).
Title: Re: [3553]Bbcode problem
Post by: ziycon on January 15, 2014, 04:53:50 AM
Anyone any objections with me tagging this one onto https://github.com/SimpleMachines/SMF2.1/issues/1175 as it's similar and around BBCode as well.?
Title: Re: [3553]Bbcode problem
Post by: Arantor on January 15, 2014, 11:02:39 AM
Separate issue please.
Title: Re: [3553]Bbcode problem
Post by: ziycon on January 15, 2014, 11:31:53 AM
Moved to github.
https://github.com/SimpleMachines/SMF2.1/issues/1197
Title: Re: [3553]Bbcode problem
Post by: Arantor on January 15, 2014, 11:39:25 AM
Thanks :)
Title: Re: [3553]Bbcode problem
Post by: Arantor on February 09, 2014, 01:05:01 AM
As this is on Github, this topic will be closed, trying to consolidate everything in one place so it can be tracked better as to what needs doing.