[tt] and [list] in same post seem to get parsed incorrectly?

Started by l_d_allan, November 27, 2008, 10:23:07 AM

Previous topic - Next topic

l_d_allan

Summary:
Having the tt and list tags in the same post seems to confuse the bbCode parser.


This reply to this NewTopic is intended to illustrate the problem. This may be "as designed" or an error on my part.

Possible resolution:

  • My speculation is that the parsing engine is perhaps getting overwhelmed by an unexpected combination of tags.
  • Further speculation is that the engine is attempting to gracefully fix the perceived problem by guessing where to put tags.
  • This often works fine, but in this case it seems to do so in a way that causes the observed glitch.
  • My observation is that this possible problem may not be limited to this specific combination of tags. I have noticed something similar with the hr tag.


Setup:

  • Admin of relatively inactive 1.1.7 www.berbible.org/forums
  • semi-newbie of 2.0b4 and bbCode tagging
  • WinXp3 / IE7 (all updates)

Further comments:

  • Happy Thanksgiving. One thing I'm thankful for is SMF.
  • Note the closing tt tag at the bottom of the reply shows up, when it probably should not be visible. (circled in red in the attachment)
  • An aside: I noticed something like this with the hr tag.
    * I attemped to report this, but then was unable to reliably repeat it.
    * The parsing engine kept trying to correct/fix my reply.
    * http://www.simplemachines.org/community/index.php?topic=276672
    * Odd.
  • I've attached a screenshot to confirm I'm not making this up after too many dreams of Thanksgiving pumpkin pie.
  • Another aside: the "use case" was an attempt to have bbCode tagging be ignored within a post
    * My incorrect speculation was that enclosing lines in the opening and closing tt tag would cause the bbCode to be ignored.
    * BTW, can that be done, and if so, how?

SMF is adding the following closing list tags. They aren't there when I click on the Save or Preview button.  The above bbCode is somewhat complicated and could be incorrect, but seems more or less ok to my untrained eye.
VVVVVVVVV

[/list][/list]
2.0 semi-newbie. Rusty at bbCode tagging. Win7-64+Sp1 and IE9. Sysop of under-construction www.canprint.org
No mods installed. Huge fan of SMF, especially terrific support.

l_d_allan

#1
<Braces may confuse parsing? or not?>
Summary:
Setup:

Further comments:

  • Another list.
[/tt]
2.0 semi-newbie. Rusty at bbCode tagging. Win7-64+Sp1 and IE9. Sysop of under-construction www.canprint.org
No mods installed. Huge fan of SMF, especially terrific support.

SleePy

This is not a bug, you are using invalid HTML itself. TT is an inline element while lists are block elements in HTML. You can't put a block element in a inline element.

Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

l_d_allan

2.0 semi-newbie. Rusty at bbCode tagging. Win7-64+Sp1 and IE9. Sysop of under-construction www.canprint.org
No mods installed. Huge fan of SMF, especially terrific support.

Advertisement: