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

Multilang content filter not working w/ HTML formatted text in user tours

XMLWordPrintable

    • MOODLE_402_STABLE

      When building multilingual user tours in both Moodle 3.11 and 4.1, I noticed the HTML tags used for designating a specific language to be filtered, don't work with HTML formatted rich text.

      Expected behaviour:

      the <span class="multilang" lang="en"></span> should wrap around the HTML formatted text with h5 headers and one or more paragraphs. E.g.:

      <span class="multilang" lang="en">
      <h5>This is a header</h5>
      <p>This is some text</p>
      </span>

      <span class="multilang" lang="nl">
      <h5>Dit is een koptekst</h5>
      <p>Dit is een alinea met tekst</p>
      </span>

      This only works if you use plain text and line break tags (<br>)

      Observed behaviour:

      The <span class="multilang" lang="en"></span> tags close before HTML formatted text is processed. This results in this HTML code in user tour steps:

      <span class="multilang" lang="en">
      </span>
      <h5>This is a header</h5>
      <p>This is some text</p>

      <span class="multilang" lang="nl">
      </span>
      <h5>Dit is een koptekst</h5>
      <p>Dit is een alinea met tekst</p>

      This causes the text to not be filtered and instead appear in two languages in the user tour steps.

            Unassigned Unassigned
            jwelshoff Joost Elshoff
            Votes:
            1 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.