Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: rejetto on November 06, 2008, 06:35:21 AM

Title: bad bbcode: size/center
Post by: rejetto on November 06, 2008, 06:35:21 AM
look
[size=20pt][center]test[/center][/size]
output
test
[/size]

you are supposed to not see the 'size' tag here above, right?


while
[center][size=20pt]test[/size][/center]
works
test



as far as i can see, this bug applies to 2.0b4 (that's here, right now :D)
Title: Re: bad bbcode: size/center
Post by: Kermit on November 06, 2008, 06:37:45 AM
this is not a bug m8,your bbc code order is wrong by the 1st 1

try it via html code,that would not work too

first set the size tag and than the center tag
Title: Re: bad bbcode: size/center
Post by: Dannii on November 06, 2008, 07:10:01 AM
center is a block level code, but size is an inline level code. If you try to put a block level tag inside an inline tag it will automatically close all the previous inline tags first.
Title: Re: bad bbcode: size/center
Post by: rejetto on November 06, 2008, 07:22:09 AM
Quote from: Duncan85 on November 06, 2008, 06:37:45 AM
try it via html code,that would not work too

i tried: it works with current versions of firefox, ie and opera.
you can check yourself
www.rejetto.com/temp/test.html

Quote from: Dannii on November 06, 2008, 07:10:01 AM
center is a block level code, but size is an inline level code. If you try to put a block level tag inside an inline tag it will automatically close all the previous inline tags first.

is this a rule of SMF or HTML?
if the latter, i didn't know it, and browsers seems to not be caring of it.

thank you for your time :)
Title: Re: bad bbcode: size/center
Post by: Dannii on November 06, 2008, 07:29:08 AM
SMF wants to produce valid HTML, so it's a bit of both.