Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-9377

Custom BB Code Nesting

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 3.0.x
    • 3.2.0-a1
    • BBCode Engine
    • None
    • PHP Environment: 5.2.0-8+etch10
      Database: MySQL 5.0.32

    Description

      I created a new custom BB Code for off topic comments, [ot]. It seems that the BB Code parser doesn't keep track of the level of a bb code tag, and it ruins the look of the post. This is a problem especially when quoting someone that has used the [ot] tag and then trying to put that inside another [ot] tag:

      [ot]

      [ot]Something off topic[/ot]

      Something else off topic[/ot]

      The parser would interpret lines 1-3 of that as the custom BB code, and screw up the formatting on it because of this (the quote tags would mismatch, and so would the last [ot]). It seems the parser doesn't take into account that another [ot] tag is open, and that it is in fact 2 levels deep.

      Nesting quote tags works fine however, which leads me to suspect it is a problem with custom BB Codes only, but I could be wrong. I haven't looked at any of the code to verify any of this information.

      For reference, the [ot] tag is defined as follows:

      [ot]

      {TEXT}[/ot]

      ...is replaced with...

      <div style="margin: .5em 1px 0 25px; border: 1px solid #ff9999; background-color: #fff5f5; padding: 5px;">
      <p style="font-weight: bold; font-size: .9em; ">Off Topic:</p>
      {TEXT}

      </div>

      Maybe a new token could be made for text that may include other bb code?

      Attachments

        Issue Links

          Activity

            People

              nicofuma nicofuma
              chrisemerson chrisemerson
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: