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

purify_html strips out multilang tags if there are embedded tags

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.7.3
    • Fix Version/s: None
    • Component/s: Filters
    • Labels:
    • Affected Branches:
      MOODLE_27_STABLE

      Description

      Take this example:
      <span lang="en" class="multilang">
      <div>A test in English</div>
      </span><span lang="fr" class="multilang">
      <div>Un test in Francais</div>
      </span>

      This works in:

      • courses pages;
      • html blocks.

      However it doesn't work (multilanguage spans are removed, hence all content is displayed independently from the current user lang) in:

      • event descriptions;
      • forum posts;
      • footnotes in clean theme;
      • ... (possibly in many other places).

      If the div(s) are not present, the multilang spans are kept and the filter works.
      My filling is that there is a filter function that all the possibly user-generated content pass trough, and this bug refers to such a function.

      I have tested with <div> but there could be other tags that interfere with the language filter.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              sylvaticus Antonello Lobianco
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated: