Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-18302

Nested ignore tags causing problems in filters...

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.4
    • Fix Version/s: 1.9.5
    • Component/s: Filters
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      While it's not usual, it's possible to have some nested "ignoretags" in filters, so something like:

      <a href="url">whatever<span class="nolink">text</span></a> (with nested <a> and "nolink" ignoretags)

      is transformed to:

      <p><a href="url">whatever<#1-%-0#></a></p

      This is caused by filterlib, trying to rebuild ignoretags in the SAME order they were found. By simply reversing the array of ignoretags, rebuild order is correct and we get the original string ok.

        Attachments

          Activity

            People

            • Assignee:
              stronk7 Eloy Lafuente (stronk7)
              Reporter:
              stronk7 Eloy Lafuente (stronk7)
              Participants:
              Component watchers:
              Jake Dallimore, Jun Pataleta
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/May/09