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

A property dir="ltr" in a span class="multilang" lang="…" Tag messes up the filter result

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.2.5, 4.3.3
    • Filters
    • MOODLE_402_STABLE, MOODLE_403_STABLE
    • MDL-81055-403
    • MDL-81055-404
    • MDL-81055-main
    • Hide

      Manual testing

      1. Log in as admin
      2. Go to Site admin -> Plugins -> Filters -> Manage filters
      3. Enable 'Multi-language content' for 'Content and headings'
      4. Create a course
      5. Add a 'Page' activity
      6. In the 'Page content' field editor, change to source code view
      7. Insert the following HTML:

        <span class="multilang" dir="ltr" lang="en">Hello</span><span class="multilang" dir="ltr" lang="de">Hallo</span><span class="multilang" dir="ltr" lang="fr">Allô</span>

      8. Save changes to the source code and save and display the page activity.
      9. CONFIRM you see only the word 'Hello' (and not the words from the other languages).
      Show
      Manual testing Log in as admin Go to Site admin -> Plugins -> Filters -> Manage filters Enable 'Multi-language content' for 'Content and headings' Create a course Add a 'Page' activity In the 'Page content' field editor, change to source code view Insert the following HTML: <span class = "multilang" dir= "ltr" lang= "en" >Hello</span><span class = "multilang" dir= "ltr" lang= "de" >Hallo</span><span class = "multilang" dir= "ltr" lang= "fr" >Allô</span> Save changes to the source code and save and display the page activity. CONFIRM you see only the word 'Hello' (and not the words from the other languages).
    • 6
    • Team Hedgehog 2024 Sprint 2.2, Team Hedgehog 2024 Sprint 2.3

      Apparently, if there is a

      dir="ltr"

      property in a

      <span class="multilang" lang="…">

      tag, the string is not filtered correctly any more.
      Some Tiny function (or button, maybe) unfortunately tends to sneak such properties in.

      FULL STEPS to reproduce:
      In a Moodle with multilang filter enabled for content and titles, in a Text and Media area, using Atto editor (change in preferences first) in source code view add

      <span class="multilang" lang="en">Hello</span><span class="multilang" lang="de">Hallo</span><span class="multilang" lang="fr">Allô</span>
       
      <br>
      <br>
       
      <span class="multilang" dir="ltr" lang="en">Hello</span><span class="multilang" dir="ltr" lang="de">Hallo</span><span class="multilang" dir="ltr" lang="fr">Allô</span>
      

      WHAT YOU EXPECTED
      You are shown Hello and Hello.

      WHAT ACTUALLY HAPPENS
      You are shown Hello and HelloHalloAllô

            david.woloszyn@moodle.com David Woloszyn
            lucaboesch Luca Bösch
            Meirza Meirza
            Jun Pataleta Jun Pataleta
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 days, 2 hours, 33 minutes
                3d 2h 33m

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