A few days ago I came across a random post from one of the members on my forum which interestingly enough contained a combination of BBC tags that partially broke the page layout, and caused further posts to appear smaller and aligned right, like this:
(http://i.imgur.com/gBx4ASA.png)
The post in question contained the following BBC:
[left][left][left][move][/Right][/right][/right]
As for what exactly happens, a post with the following contents:
#POSTSTART#[left][left][left][move][/right][/right][/right]#POSTEND#
gets converted to the following HTML:
#POSTSTART#<div style="text-align: left;"><div style="text-align: left;"><div style="text-align: left;"><marquee>[/right][/right][/right]#POSTEND#</div></div></div></marquee>
In other words, for some reason the [left] tags get automatically closed before the [marquee] is, causing the browser to insert its own additional </div>s after the </marquee>.
This also works on an unmodded SMF 2.0.11, and I've also tested it on an older 2.1 beta where it also happened. I did some testing around, and while the end [/right] tags get displayed as if they had not been parsed, removing them will make the bug stop occurring. There is nothing in the error log or server logs.
not technically a bug... it's an issue with how the user is entering the BBC tags...
tags can only be entered in a certain order for some combinations.
Thanks for the quick reply.
Quote from: Kindred on October 26, 2015, 12:17:46 PM
not technically a bug... it's an issue with how the user is entering the BBC tags...
tags can only be entered in a certain order for some combinations.
True, it's a completely invalid combination of BBC tags; but this can be abused with multiple posts in a row to make posts so small that they can't even be read anymore (for example in this (http://tolp2.nl/forum/index.php?topic=2009.0) topic)
LOLz your members do know how to have some fun :P :P :P
While I agree that it is a weird behavior, I'm pretty sure it can't be "fixed" (if you consider it broken) in either 2.0 or 2.1, realistically... I would suggest that it's impossible to make sure that all outputted HTML is valid...
There really isn't anything we can do about invalid combinations of tags like that. Finding every possible combination and putting them in the correct order would be a pain.