News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Size BBCode 'nesting' problem

Started by excaliburj, September 01, 2010, 02:16:37 PM

Previous topic - Next topic

excaliburj

Sorry if this has already been addressed. This applies to 2.0 RC3 (and, obviously, current code on this site).

If using 'unitless' size value in the size BBCode, this is the displayed (and, I think, expected) behavior:
Normal - [size=3]At size 3 - [size=4]Up to 4 - [size=5]Up to 5 - [/size]After 5 (s/b 4) - [/size]After 4 (s/b 3) - [/size]back to normal.
Normal - At size 3 - Up to 4 - Up to 5 - After 5 (s/b 4) - After 4 (s/b 3) - back to normal.

But when using units, display is not what I believe would be expected:
Normal - [size=12pt]At size 12pt - [size=18pt]Up to 18pt - [size=24pt]Up to 24pt - [/size]After 24pt (s/b 18pt) - [/size]After 18pt (s/b 12pt) - [/size]back to normal.
Normal - At size 12pt - Up to 18pt - Up to 24pt - After 24pt (s/b 18pt) - After 18pt (s/b 12pt) - back to normal.

Investigation shows that BBCode parsing has a specific 'disallow_children' restriction on further 'size' entries within a 'size' span. But only for size when a unit is given. As far as I can see, except for prevention of nesting URIs within URIs, this is the only place where 'disallow_children' seems to be used.

Is it really meant to have this be OK:
Normal - [size=3]At size 3 - [size=24pt]Up to 24pt - [/size]After 24pt (s/b 3) - [/size]back to normal.
Normal - At size 3 - Up to 24pt - After 24pt (s/b 3) - back to normal.

And this disallowed:
Normal - [size=24pt]At size 24pt - [size=3]Now at 3 - [/size]After 3 (s/b 24pt) - [/size]back to normal.
Normal - At size 24pt - Now at 3 - After 3 (s/b 24pt) - back to normal.

Is there an actual purpose to this restriction or should it be removed?
Random Sig Line

vivid


تجميل <a href="http://www.arbsb.com" rel="dofollow">طرائف</a>
<a href="http://www.arbsb.com">مجلة الغرائب عرب سبيس </a>

excaliburj

So, it got fixed in the development version.

And apparently, the disallow_children was removed.

Of course, that's only an assumption because not a single team member bothered to comment or point to a bug tracker entry.

Thanks a bunch.
Random Sig Line

Aleksi "Lex" Kilpinen

Unitless Size tags were not parsed correctly in RC2 - I'm unsure if it got fixed in RC3 or after RC3.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

excaliburj

When I posted this originally, it was not fixed here on this site.

The original post did not display correctly.

It was fixed in the build used here - not in RC3.
Random Sig Line

excaliburj

And it was NOT the unitless which were displaying incorrectly.

It was the size code WITH units which had the 'disallow_children' limitation on it.

This limitation has obviously been removed.
Random Sig Line

Aleksi "Lex" Kilpinen

Oh, sorry - it seems I didn't read your post carefully enough, anyway - good that it's fixed now, right?
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Norv

There was no bug tracker entry. (not all issues are tracked, though many are)

But yes, this was just solved in the development version, you're right, excaliburj. It will be in RC4.

Thank you for the report and discussion.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

vivid

Quote from: Norv on October 29, 2010, 05:19:25 PM
There was no bug tracker entry. (not all issues are tracked, though many are)

But yes, this was just solved in the development version, you're right, excaliburj. It will be in RC4.

Thank you for the re

Hi Norv,

This issue still unsolved now we are in v2.0rc4.

تجميل <a href="http://www.arbsb.com" rel="dofollow">طرائف</a>
<a href="http://www.arbsb.com">مجلة الغرائب عرب سبيس </a>

Norv

vivid, can you please tell:
Can you replicate it on an unmodded RC4?
Can you replicate it on this forum?
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Advertisement: