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

"Activity names auto-linking" filter and activity name like "-" (hyphen) breaks course content visualization

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.5.6, 3.6.4, 3.7, 3.8, 3.9
    • 3.7.5, 3.8.2
    • Filters
    • MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • MOODLE_37_STABLE, MOODLE_38_STABLE
    • Hide
      1. Navigate to Plugins > Filters > Manage filters
      2. Ensure the Activity names auto-linking filter is active (set to On)
      3. In a course, create an assignment activity named '-' (single hyphen)
      4. Create a label resource, with the content "This is a label"
      5. Confirm label displays correctly on course page
      6. Create a second label resource, with the content "Here's a link to the - assignment"
      7. Confirm label displays correctly on course page, and the '-' character is a link to the assignment in step 3
      Show
      Navigate to Plugins > Filters > Manage filters Ensure the Activity names auto-linking filter is active (set to On ) In a course, create an assignment activity named '-' (single hyphen) Create a label resource, with the content " This is a label " Confirm label displays correctly on course page Create a second label resource, with the content " Here's a link to the - assignment " Confirm label displays correctly on course page, and the '-' character is a link to the assignment in step 3

    Description

      Steps to reproduce

      • Make sure "Activity names auto-linking" filter is active at site and course level.
      • In a course, create an Assignment and set name to "-".
      • In the same course create a label with some content and return to course.
      • You should see label's content broken.

      What actually happens

      • "Activity names auto-linking": on.
      • Assignment's name "-".
      • Label's original content:  "This is a label".
      • Wrong visualization of label's content: "<%1-%0%><%2%1%>This is a label<%3%2%><%4%3%><%5%-4%>".
        • Each of the hyphens is a link pointing to the task named "-".
        • This behavior affects the descriptions shown in the course of each resource or activity.
        • If you switch off "Activity names auto-linking", content turns readable.

      Expected

      • "Activity names auto-linking": on.
      • Assignment's name "-".
      • Label's original content:  "This is a label".
      • Correct visualization of label's content: "This is a label".

       

      Attachments

        1. filter-off.png
          filter-off.png
          6 kB
        2. filter-on.png
          filter-on.png
          10 kB
        3. MDL-65884.jpg
          MDL-65884.jpg
          11 kB

        Issue Links

          Activity

            People

              pholden Paul Holden
              jmabreu Juan Miguel
              Simey Lameze Simey Lameze
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Anna Carissa Sadia Anna Carissa Sadia
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                9/Mar/20

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 35 minutes
                  1h 35m